mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -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:
parent
39054d7810
commit
6f817c0c5c
@ -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(
|
||||
@ -305,13 +311,13 @@ class GenericProvider:
|
||||
continue
|
||||
|
||||
if not len(parse_result.episode_numbers) and (
|
||||
parse_result.season_number and parse_result.season_number != season) or (
|
||||
not parse_result.season_number and season != 1):
|
||||
parse_result.season_number and parse_result.season_number != season) or (
|
||||
not parse_result.season_number and season != 1):
|
||||
logger.log(u"The result " + title + " doesn't seem to be a valid season that we want, ignoring",
|
||||
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)
|
||||
|
@ -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 = {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user