1
0
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:
echel0n 2014-07-20 23:43:52 -07:00
parent af0ccd65cf
commit d6442e0685

View File

@ -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)