logger.log(u"Seeing if we need anything from "+show.name,logger.DEBUG)
myDB=db.DBConnection()
ifshow.air_by_date:
sqlResults=myDB.select(
"SELECT ep.status, ep.season, ep.episode FROM tv_episodes ep, tv_shows show WHERE season != 0 AND ep.showid = show.indexer_id AND show.paused = 0 AND ep.airdate > ? AND ep.showid = ? AND show.air_by_date = 1",
[fromDate.toordinal(),show.indexerid])
else:
sqlResults=myDB.select(
"SELECT status, season, episode FROM tv_episodes WHERE showid = ? AND season > 0 and airdate > ?",
sqlResults=myDB.select("SELECT status, season, episode FROM tv_episodes WHERE showid = ? AND season > 0 and airdate > ?",
[show.indexerid,fromDate.toordinal()])
# check through the list of statuses to see if we want any
logger.log(u"Seeing if we need anything from {show_name}".format(show_name=show.name),logger.DEBUG)
myDB=db.DBConnection()
ifshow.air_by_date:
sqlResults=myDB.select(
"SELECT ep.status, ep.season, ep.episode FROM tv_episodes ep, tv_shows show WHERE season != 0 AND ep.showid = show.indexer_id AND show.paused = 0 AND ep.airdate > ? AND ep.showid = ? AND show.air_by_date = 1",
sqlResults=myDB.select("SELECT status, season, episode FROM tv_episodes WHERE season > 0 AND airdate > ? AND showid = ?",
[fromDate.toordinal(),show.indexerid])
else:
sqlResults=myDB.select(
"SELECT status, season, episode FROM tv_episodes WHERE showid = ? AND season > 0 and airdate > ?",
[show.indexerid,fromDate.toordinal()])
# check through the list of statuses to see if we want any