1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 11:32:20 -05:00

Fixed to use tvdb_id from trakt api instead of indexer_id which is not given

This commit is contained in:
joshjowen 2014-04-27 18:16:06 +10:00
parent 18b781532c
commit 1f03d1c252

View File

@ -51,18 +51,18 @@ class TraktChecker():
return
for show in watchlist:
if int(sickbeard.TRAKT_METHOD_ADD) != 2:
self.addDefaultShow(show["indexer_id"], show["title"], SKIPPED)
self.addDefaultShow(show["tvdb_id"], show["title"], SKIPPED)
else:
self.addDefaultShow(show["indexer_id"], show["title"], WANTED)
self.addDefaultShow(show["tvdb_id"], show["title"], WANTED)
if int(sickbeard.TRAKT_METHOD_ADD) == 1:
newShow = helpers.findCertainShow(sickbeard.showList, int(show["indexer_id"]))
newShow = helpers.findCertainShow(sickbeard.showList, int(show["tvdb_id"]))
if newShow is not None:
self.setEpisodeToWanted(newShow, 1, 1)
self.startBacklog(newShow)
else:
self.todoWanted.append((int(show["indexer_id"]), 1, 1))
self.todoWanted.append((int(show["indexer_id"]), -1, -1)) #used to pause new shows if the settings say to
self.todoWanted.append((int(show["tvdb_id"]), 1, 1))
self.todoWanted.append((int(show["tvdb_id"]), -1, -1)) #used to pause new shows if the settings say to
def updateEpisodes(self):
"""
@ -75,13 +75,13 @@ class TraktChecker():
logger.log(u"Could not connect to trakt service, aborting watchlist update", logger.ERROR)
return
for show in watchlist:
self.addDefaultShow(int(show["indexer_id"]), show["title"], SKIPPED)
newShow = helpers.findCertainShow(sickbeard.showList, int(show["indexer_id"]))
self.addDefaultShow(int(show["tvdb_id"]), show["title"], SKIPPED)
newShow = helpers.findCertainShow(sickbeard.showList, int(show["tvdb_id"]))
for episode in show["episodes"]:
if newShow is not None:
self.setEpisodeToWanted(newShow, episode["season"], episode["number"])
else:
self.todoWanted.append((int(show["indexer_id"]), episode["season"], episode["number"]))
self.todoWanted.append((int(show["tvdb_id"]), episode["season"], episode["number"]))
self.startBacklog(newShow)
def addDefaultShow(self, indexerid, name, status):
@ -102,7 +102,7 @@ class TraktChecker():
return
else:
helpers.chmodAsParent(showPath)
sickbeard.showQueueScheduler.action.addShow(int(showObj.indexer), int(indexerid), showPath, status,
sickbeard.showQueueScheduler.action.addShow(int(sickbeard.INDEXER_DEFAULT), int(indexerid), showPath, status,
int(sickbeard.QUALITY_DEFAULT),
int(sickbeard.FLATTEN_FOLDERS_DEFAULT))