mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-12 14:28:43 -05:00
Places Quality UNKNOWN items from provider results at end of itemsList leaving order of sorted items highest to lowest.
This commit is contained in:
parent
d6442e0685
commit
57cf86279b
@ -269,10 +269,14 @@ class GenericProvider:
|
||||
# sort list by quality
|
||||
if len(itemList):
|
||||
items = {}
|
||||
itemsUnknown = []
|
||||
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)]
|
||||
if quality == Quality.UNKNOWN:
|
||||
itemsUnknown += item
|
||||
else:
|
||||
items[quality] = item
|
||||
itemList = [items.pop(k) for k in sorted(items, reverse=True)] + itemsUnknown
|
||||
|
||||
# filter results
|
||||
for item in itemList:
|
||||
|
Loading…
Reference in New Issue
Block a user