1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00

Fixed post-processing issues with shows being rejected and saying they didn't exist when infact they did.

Fixed a issue in our name parser code that would of resulted in searches failing completely.
This commit is contained in:
echel0n 2014-05-30 01:16:12 -07:00
parent f01c5852d4
commit 05cca0dfe0
2 changed files with 15 additions and 3 deletions

View File

@ -137,13 +137,18 @@ class NameParser(object):
result.series_name = self.clean_series_name(result.series_name)
cur_show = helpers.get_show_by_name(result.series_name, useIndexer=self.useIndexers)
if self.show and cur_show:
if not cur_show:
continue
# if we have a show object to compare against then do so else return the result anyways
if self.show:
if self.show.indexerid != cur_show.indexerid:
logger.log(
u"I expected an episode of the show " + self.show.name + " but the parser thinks its the show " + cur_show.name + ". I will continue thinking its " + self.show.name,
logger.WARNING)
else:
result.show = self.show
continue
result.show = cur_show
if 'season_num' in named_groups:
tmp_season = int(match.group('season_num'))

View File

@ -416,6 +416,9 @@ class PostProcessor(object):
continue
show = helpers.findCertainShow(sickbeard.showList, int(sql_results[0]["showid"]))
if not show:
continue
season = int(sql_results[0]["season"])
quality = int(sql_results[0]["quality"])
@ -481,6 +484,10 @@ class PostProcessor(object):
self._log(u"Parsed " + name + " into " + str(parse_result).decode('utf-8', 'xmlcharrefreplace'), logger.DEBUG)
# couldn't find this in our show list
if not parse_result.show:
return to_return
if parse_result.air_by_date:
season = -1
episodes = [parse_result.air_date]