mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 19:12:26 -05:00
Fixes issues in tvcache
This commit is contained in:
parent
e789c065ee
commit
75c7fbf137
@ -973,7 +973,9 @@ def get_show_by_name(name):
|
||||
if indexerid:
|
||||
logger.log(u"Found Indexer ID:[" + repr(indexerid) + "], using that for [" + name + "}",logger.DEBUG)
|
||||
if not showObj:
|
||||
showObj = [x for x in sickbeard.showList if x.indexerid == indexerid][0]
|
||||
showObjList = [x for x in sickbeard.showList if x.indexerid == indexerid]
|
||||
if len(showObjList):
|
||||
showObj = showObjList[0]
|
||||
return showObj
|
||||
|
||||
def is_hidden_folder(folder):
|
||||
|
@ -203,7 +203,8 @@ class TVCache():
|
||||
logger.log(u"No series name retrieved from " + name + ", unable to cache it", logger.DEBUG)
|
||||
return None
|
||||
|
||||
if not helpers.get_show_by_name(parse_result.series_name):
|
||||
showObj = helpers.get_show_by_name(parse_result.series_name)
|
||||
if showObj:
|
||||
logger.log(u"Could not find a show matching " + parse_result.series_name + " in the database, skipping ...", logger.DEBUG)
|
||||
return None
|
||||
|
||||
@ -212,7 +213,7 @@ class TVCache():
|
||||
|
||||
airdate = parse_result.air_date.toordinal()
|
||||
sql_results = myDB.select("SELECT season, episode FROM tv_episodes WHERE showid = ? AND indexer = ? AND airdate = ?",
|
||||
[parse_result.show.indexerid, parse_result.show.indexer, airdate])
|
||||
[showObj.indexerid, showObj.indexer, airdate])
|
||||
if sql_results > 0:
|
||||
season = int(sql_results[0]["season"])
|
||||
episodes = [int(sql_results[0]["episode"])]
|
||||
|
Loading…
Reference in New Issue
Block a user