mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -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:
|
if quality == Quality.UNKNOWN:
|
||||||
itemsUnknown += item
|
itemsUnknown += item
|
||||||
else:
|
else:
|
||||||
items[quality] = item
|
if quality not in items:
|
||||||
itemList = [items.pop(k) for k in sorted(items, reverse=True)] + itemsUnknown
|
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
|
# filter results
|
||||||
for item in itemList:
|
for item in itemList:
|
||||||
@ -297,6 +300,9 @@ class GenericProvider:
|
|||||||
quality = parse_result.quality
|
quality = parse_result.quality
|
||||||
release_group = parse_result.release_group
|
release_group = parse_result.release_group
|
||||||
|
|
||||||
|
actual_season = None
|
||||||
|
actual_episodes = None
|
||||||
|
|
||||||
if not (showObj.air_by_date or showObj.sports):
|
if not (showObj.air_by_date or showObj.sports):
|
||||||
if search_mode == 'sponly' and len(parse_result.episode_numbers):
|
if search_mode == 'sponly' and len(parse_result.episode_numbers):
|
||||||
logger.log(
|
logger.log(
|
||||||
@ -305,13 +311,13 @@ class GenericProvider:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if not len(parse_result.episode_numbers) and (
|
if not len(parse_result.episode_numbers) and (
|
||||||
parse_result.season_number and parse_result.season_number != season) or (
|
parse_result.season_number and parse_result.season_number != season) or (
|
||||||
not parse_result.season_number and season != 1):
|
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.log(u"The result " + title + " doesn't seem to be a valid season that we want, ignoring",
|
||||||
logger.DEBUG)
|
logger.DEBUG)
|
||||||
continue
|
continue
|
||||||
elif len(parse_result.episode_numbers) and (
|
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]):
|
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.log(u"The result " + title + " doesn't seem to be a valid episode that we want, ignoring",
|
||||||
logger.DEBUG)
|
logger.DEBUG)
|
||||||
|
@ -114,8 +114,6 @@ class NewznabProvider(generic.NZBProvider):
|
|||||||
return to_return
|
return to_return
|
||||||
|
|
||||||
def _get_episode_search_strings(self, ep_obj, add_string=''):
|
def _get_episode_search_strings(self, ep_obj, add_string=''):
|
||||||
return self._get_season_search_strings(ep_obj)
|
|
||||||
|
|
||||||
to_return = []
|
to_return = []
|
||||||
params = {}
|
params = {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user