Closed jonian closed 1 year ago
This breaks the way the quality is classified, as they need to be ordered. I understand the problem you are pointing out. However I don't think there is a problem with the implementation but with the 720p regex including "bluray" keyword. Maybe we need to remove it from the regex? https://github.com/i96751414/script.flix.magneto/blob/1a84f074aa84de46b371c9ccaf5f35d0b23009de/lib/filters.py#L27
Other possibility (which I like better) would be to reverse iterate the list, so we try to match higher qualities first: https://github.com/i96751414/script.flix.magneto/blob/1a84f074aa84de46b371c9ccaf5f35d0b23009de/lib/filters.py#L18-L20
Yes, matching in reverse looks like a better idea. Will that cause any issues with the other filters?
My logic in this PR was to first match strictly and then try more loose matches if no match was found.
I don't think that would break other filters - probably it would improve them as well.
The important bit here is to make sure the higher the quality, the higher the factor/index is associated with such result (hence the importance of the order). We can reverse this like for i, v in reversed(list(enumerate(cls.values, 1))):
Resolution filter matches on multiple words and that leads to wrong resolutions. For example: