mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
Corrected API to work with new nextepisode function code changes.
This commit is contained in:
parent
a085f0f538
commit
58788f52e5
2 changed files with 7 additions and 7 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue