1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-14 13:25:11 -05:00

Merge branch 'origin/dev'

This commit is contained in:
echel0n 2014-05-13 12:05:08 -07:00
commit a178686419

View File

@ -232,7 +232,8 @@ class GenericProvider:
for epObj in episodes: for epObj in episodes:
if not epObj.show.air_by_date: if not epObj.show.air_by_date:
if epObj.scene_season == 0 or epObj.scene_episode == 0: if epObj.scene_season == 0 or epObj.scene_episode == 0:
logger.log(u"Incomplete Indexer <-> Scene mapping detected for " + epObj.prettyName() + ", skipping search!") logger.log(
u"Incomplete Indexer <-> Scene mapping detected for " + epObj.prettyName() + ", skipping search!")
continue continue
cacheResult = self.cache.searchCache(epObj, manualSearch) cacheResult = self.cache.searchCache(epObj, manualSearch)
@ -279,13 +280,13 @@ class GenericProvider:
if not (self.show.air_by_date or self.show.sports): if not (self.show.air_by_date or self.show.sports):
if not len(parse_result.episode_numbers) and ( if not len(parse_result.episode_numbers) and (
parse_result.season_number != None and parse_result.season_number != ep_obj.season) or ( parse_result.season_number != None and parse_result.season_number != ep_obj.season) or (
parse_result.season_number == None and ep_obj.season != 1): parse_result.season_number == None and ep_obj.season != 1):
logger.log(u"The result " + title + " doesn't seem to be a valid season for season " + str( logger.log(u"The result " + title + " doesn't seem to be a valid season for season " + str(
ep_obj.season) + ", ignoring", logger.DEBUG) ep_obj.season) + ", ignoring", logger.DEBUG)
continue continue
elif len(parse_result.episode_numbers) and ( elif len(parse_result.episode_numbers) and (
parse_result.season_number != ep_obj.season or ep_obj.episode not in parse_result.episode_numbers): parse_result.season_number != ep_obj.season or ep_obj.episode not in parse_result.episode_numbers):
logger.log(u"Episode " + title + " isn't " + str(ep_obj.season) + "x" + str( logger.log(u"Episode " + title + " isn't " + str(ep_obj.season) + "x" + str(
ep_obj.episode) + ", skipping it", logger.DEBUG) ep_obj.episode) + ", skipping it", logger.DEBUG)
continue continue
@ -300,15 +301,17 @@ class GenericProvider:
logger.DEBUG) logger.DEBUG)
continue continue
if parse_result.air_date != ep_obj.airdate: if (parse_result.air_by_date and parse_result.air_date != ep_obj.airdate) or (
parse_result.sports and parse_result.sports_event_date != ep_obj.airdate):
logger.log("Episode " + title + " didn't air on " + str(ep_obj.airdate) + ", skipping it", logger.log("Episode " + title + " didn't air on " + str(ep_obj.airdate) + ", skipping it",
logger.DEBUG) logger.DEBUG)
continue continue
myDB = db.DBConnection() myDB = db.DBConnection()
sql_results = myDB.select("SELECT season, episode FROM tv_episodes WHERE showid = ? AND airdate = ?", sql_results = myDB.select(
[show.indexerid, "SELECT season, episode FROM tv_episodes WHERE showid = ? AND airdate = ?",
parse_result.air_date.toordinal() or parse_result.sports_event_date.toordinal()]) [show.indexerid,
parse_result.air_date.toordinal() or parse_result.sports_event_date.toordinal()])
if len(sql_results) != 1: if len(sql_results) != 1:
logger.log( logger.log(
@ -328,7 +331,8 @@ class GenericProvider:
if not wantEp: if not wantEp:
logger.log( logger.log(
u"Ignoring result " + title + " because we don't want an episode that is " + Quality.qualityStrings[ u"Ignoring result " + title + " because we don't want an episode that is " +
Quality.qualityStrings[
quality], logger.DEBUG) quality], logger.DEBUG)
continue continue