mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Provider results get sorted by quality before filtering occures.
This commit is contained in:
parent
af0ccd65cf
commit
d6442e0685
1 changed files with 8 additions and 0 deletions
|
@ -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 a new issue