mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
Handle case where we don't get back valid data from trakt
This commit is contained in:
parent
dbc30c43cb
commit
9bcd914ef2
1 changed files with 11 additions and 8 deletions
|
@ -148,13 +148,16 @@ class TraktChecker():
|
|||
self.addDefaultShow(indexer, indexer_id, show["title"], SKIPPED)
|
||||
newShow = helpers.findCertainShow(sickbeard.showList, indexer_id)
|
||||
|
||||
if newShow and int(newShow['indexer']) == indexer:
|
||||
for episode in show["episodes"]:
|
||||
if newShow is not None:
|
||||
self.setEpisodeToWanted(newShow, episode["season"], episode["number"])
|
||||
else:
|
||||
self.todoWanted.append((indexer_id, episode["season"], episode["number"]))
|
||||
self.startBacklog(newShow)
|
||||
try:
|
||||
if newShow and int(newShow['indexer']) == indexer:
|
||||
for episode in show["episodes"]:
|
||||
if newShow is not None:
|
||||
self.setEpisodeToWanted(newShow, episode["season"], episode["number"])
|
||||
else:
|
||||
self.todoWanted.append((indexer_id, episode["season"], episode["number"]))
|
||||
self.startBacklog(newShow)
|
||||
except TypeError:
|
||||
logger.log(u"Could not parse the output from trakt for " + show["title"], logger.DEBUG)
|
||||
|
||||
def addDefaultShow(self, indexer, indexer_id, name, status):
|
||||
"""
|
||||
|
@ -233,4 +236,4 @@ class TraktChecker():
|
|||
for season in segment[1]:
|
||||
logger.log(u"Starting backlog for " + show.name + " season " + str(
|
||||
season) + " because some eps were set to wanted")
|
||||
self.todoBacklog.remove(segment)
|
||||
self.todoBacklog.remove(segment)
|
||||
|
|
Loading…
Reference in a new issue