2021-01-13, 22:37
I found (and fixed) a bug when determining the preferred trailer.
At the same time, I noticed that the automatic selection of the trailer based on the preferred settings is probably not entirely logical. For information: a trailer can contain different resolutions (such as YouTube).
The trailer is currently being determined as follows:
Possible settings:
Steps to get the trailer:
Why illogical?
Assuming "preferred" is 720p, "minimum" is 480p:
If none of the trailers has a video stream with 720p, the first trailer has a 480p and the second 1080p, then the first one (the worse one) is used, as this one is the first to meet the requirements.
This happens because the scraper order is respected. But I would actually prefer a trailer in 1080p, even if it comes from the secondary scraper.
What do you think? Should the order of trailers be ignored in the future in favor of quality? Reply with "Order is everything!" or "Beautiful people want beautiful trailers!"
At the same time, I noticed that the automatic selection of the trailer based on the preferred settings is probably not entirely logical. For information: a trailer can contain different resolutions (such as YouTube).
The trailer is currently being determined as follows:
Possible settings:
- Scraper order: is taken into account and sorted accordingly
- Preferred resolution: 144p to 2160p or Any
- Minimum quality (if not "any" preferred): 144p to 2160p or Any
Steps to get the trailer:
- If "preferred quality" = any => first trailer in the list (resolution irrelevant) will be used
- If "preferred quality" = 144p to 2160p => first trailer with a video stream of this quality will be used
- If none found in "preferred quality" => now it gets complicated and somewhat illogical => first trailer that has the "minimum" or higher quality
Why illogical?
Assuming "preferred" is 720p, "minimum" is 480p:
If none of the trailers has a video stream with 720p, the first trailer has a 480p and the second 1080p, then the first one (the worse one) is used, as this one is the first to meet the requirements.
This happens because the scraper order is respected. But I would actually prefer a trailer in 1080p, even if it comes from the secondary scraper.
What do you think? Should the order of trailers be ignored in the future in favor of quality? Reply with "Order is everything!" or "Beautiful people want beautiful trailers!"