mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Provider results get sorted by quality before filtering occures.
This commit is contained in:
parent
af0ccd65cf
commit
d6442e0685
@ -266,6 +266,14 @@ class GenericProvider:
|
||||
if len(results) == len(episodes):
|
||||
return results
|
||||
|
||||
# sort list by quality
|
||||
if len(itemList):
|
||||
items = {}
|
||||
for item in itemList:
|
||||
quality = self.getQuality(item, anime=show.is_anime)
|
||||
items[quality] = item
|
||||
itemList = [items.pop(k) for k in sorted(items, reverse=True)]
|
||||
|
||||
# filter results
|
||||
for item in itemList:
|
||||
(title, url) = self._get_title_and_url(item)
|
||||
|
Loading…
Reference in New Issue
Block a user