1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Corrected API to work with new nextepisode function code changes.

This commit is contained in:
echel0n 2014-07-08 22:53:51 -07:00
parent a085f0f538
commit 58788f52e5
2 changed files with 7 additions and 7 deletions

View File

@ -985,7 +985,7 @@ class TVShow(object):
if sqlResults == None or len(sqlResults) == 0:
logger.log(str(self.indexerid) + u": No episode found... need to implement a show status",
logger.DEBUG)
return []
return None
else:
logger.log(str(self.indexerid) + u": Found episode " + str(sqlResults[0]["season"]) + "x" + str(
sqlResults[0]["episode"]), logger.DEBUG)

View File

@ -1759,9 +1759,9 @@ class CMD_Show(ApiCall):
showDict["status"] = showObj.status
nextAirdate = ''
nextEps = showObj.nextEpisode()
if (len(nextEps) != 0):
nextAirdate = _ordinal_to_dateForm(nextEps[0].airdate.toordinal())
nextEp = showObj.nextEpisode()
if nextEp:
nextAirdate = _ordinal_to_dateForm(nextEp.airdate.toordinal())
showDict["next_ep_airdate"] = nextAirdate
return _responds(RESULT_SUCCESS, showDict)
@ -2501,9 +2501,9 @@ class CMD_Shows(ApiCall):
shows = {}
for curShow in sickbeard.showList:
nextAirdate = ''
nextEps = curShow.nextEpisode()
if (len(nextEps) != 0):
nextAirdate = _ordinal_to_dateForm(nextEps[0].airdate.toordinal())
nextEp = curShow.nextEpisode()
if nextEp:
nextAirdate = _ordinal_to_dateForm(nextEp.airdate.toordinal())
if self.paused != None and bool(self.paused) != bool(curShow.paused):
continue