1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 19:12:26 -05:00

Quality sorting fixed for provider results.

Reverted newznab search strings being confined to just season till we can find a better way of correcting the issue with Usenet Crawler.
This commit is contained in:
echel0n 2014-07-21 08:38:56 -07:00
parent 39054d7810
commit 6f817c0c5c
2 changed files with 11 additions and 7 deletions

View File

@ -275,8 +275,11 @@ class GenericProvider:
if quality == Quality.UNKNOWN:
itemsUnknown += item
else:
items[quality] = item
itemList = [items.pop(k) for k in sorted(items, reverse=True)] + itemsUnknown
if quality not in items:
items[quality] = [item]
else:
items[quality].append(item)
itemList = [x[0] for x in [items.pop(k) for k in sorted(items, reverse=True)] + itemsUnknown]
# filter results
for item in itemList:
@ -297,6 +300,9 @@ class GenericProvider:
quality = parse_result.quality
release_group = parse_result.release_group
actual_season = None
actual_episodes = None
if not (showObj.air_by_date or showObj.sports):
if search_mode == 'sponly' and len(parse_result.episode_numbers):
logger.log(
@ -311,7 +317,7 @@ class GenericProvider:
logger.DEBUG)
continue
elif len(parse_result.episode_numbers) and (
parse_result.season_number != season or not [item for ep in episodes if
parse_result.season_number != season or not [ep for ep in episodes if
ep.scene_episode in parse_result.episode_numbers]):
logger.log(u"The result " + title + " doesn't seem to be a valid episode that we want, ignoring",
logger.DEBUG)

View File

@ -114,8 +114,6 @@ class NewznabProvider(generic.NZBProvider):
return to_return
def _get_episode_search_strings(self, ep_obj, add_string=''):
return self._get_season_search_strings(ep_obj)
to_return = []
params = {}