mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 19:42:20 -05:00
Fix for sports air-by-date shows
This commit is contained in:
parent
ed8de59e91
commit
d2b4ad526d
@ -232,7 +232,8 @@ class GenericProvider:
|
||||
for epObj in episodes:
|
||||
if not epObj.show.air_by_date:
|
||||
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
|
||||
|
||||
cacheResult = self.cache.searchCache(epObj, manualSearch)
|
||||
@ -300,13 +301,15 @@ class GenericProvider:
|
||||
logger.DEBUG)
|
||||
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.DEBUG)
|
||||
continue
|
||||
|
||||
myDB = db.DBConnection()
|
||||
sql_results = myDB.select("SELECT season, episode FROM tv_episodes WHERE showid = ? AND airdate = ?",
|
||||
sql_results = myDB.select(
|
||||
"SELECT season, episode FROM tv_episodes WHERE showid = ? AND airdate = ?",
|
||||
[show.indexerid,
|
||||
parse_result.air_date.toordinal() or parse_result.sports_event_date.toordinal()])
|
||||
|
||||
@ -328,7 +331,8 @@ class GenericProvider:
|
||||
|
||||
if not wantEp:
|
||||
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)
|
||||
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user