Merge pull request #369 from WebSpider/dev-findproper_airdate

Findproper airdate conditionals
This commit is contained in:
Nils 2014-05-05 01:32:15 +02:00
commit 7f862a4a74

View file

@ -182,7 +182,11 @@ class ProperFinder():
logger.log(
u"Looks like this is an air-by-date or sports show, attempting to convert the date to season/episode",
logger.DEBUG)
airdate = curProper.airdate.toordinal()
if curProper.airdate:
airdate = curProper.airdate.toordinal()
else:
airdate = None
myDB = db.DBConnection()
sql_result = myDB.select(
"SELECT season, episode FROM tv_episodes WHERE showid = ? and indexer = ? and airdate = ?",