mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Fixed to use tvdb_id from trakt api instead of indexer_id which is not given
This commit is contained in:
parent
18b781532c
commit
1f03d1c252
1 changed files with 9 additions and 9 deletions
|
@ -51,18 +51,18 @@ class TraktChecker():
|
||||||
return
|
return
|
||||||
for show in watchlist:
|
for show in watchlist:
|
||||||
if int(sickbeard.TRAKT_METHOD_ADD) != 2:
|
if int(sickbeard.TRAKT_METHOD_ADD) != 2:
|
||||||
self.addDefaultShow(show["indexer_id"], show["title"], SKIPPED)
|
self.addDefaultShow(show["tvdb_id"], show["title"], SKIPPED)
|
||||||
else:
|
else:
|
||||||
self.addDefaultShow(show["indexer_id"], show["title"], WANTED)
|
self.addDefaultShow(show["tvdb_id"], show["title"], WANTED)
|
||||||
|
|
||||||
if int(sickbeard.TRAKT_METHOD_ADD) == 1:
|
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:
|
if newShow is not None:
|
||||||
self.setEpisodeToWanted(newShow, 1, 1)
|
self.setEpisodeToWanted(newShow, 1, 1)
|
||||||
self.startBacklog(newShow)
|
self.startBacklog(newShow)
|
||||||
else:
|
else:
|
||||||
self.todoWanted.append((int(show["indexer_id"]), 1, 1))
|
self.todoWanted.append((int(show["tvdb_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)) #used to pause new shows if the settings say to
|
||||||
|
|
||||||
def updateEpisodes(self):
|
def updateEpisodes(self):
|
||||||
"""
|
"""
|
||||||
|
@ -75,13 +75,13 @@ class TraktChecker():
|
||||||
logger.log(u"Could not connect to trakt service, aborting watchlist update", logger.ERROR)
|
logger.log(u"Could not connect to trakt service, aborting watchlist update", logger.ERROR)
|
||||||
return
|
return
|
||||||
for show in watchlist:
|
for show in watchlist:
|
||||||
self.addDefaultShow(int(show["indexer_id"]), show["title"], SKIPPED)
|
self.addDefaultShow(int(show["tvdb_id"]), show["title"], SKIPPED)
|
||||||
newShow = helpers.findCertainShow(sickbeard.showList, int(show["indexer_id"]))
|
newShow = helpers.findCertainShow(sickbeard.showList, int(show["tvdb_id"]))
|
||||||
for episode in show["episodes"]:
|
for episode in show["episodes"]:
|
||||||
if newShow is not None:
|
if newShow is not None:
|
||||||
self.setEpisodeToWanted(newShow, episode["season"], episode["number"])
|
self.setEpisodeToWanted(newShow, episode["season"], episode["number"])
|
||||||
else:
|
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)
|
self.startBacklog(newShow)
|
||||||
|
|
||||||
def addDefaultShow(self, indexerid, name, status):
|
def addDefaultShow(self, indexerid, name, status):
|
||||||
|
@ -102,7 +102,7 @@ class TraktChecker():
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
helpers.chmodAsParent(showPath)
|
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.QUALITY_DEFAULT),
|
||||||
int(sickbeard.FLATTEN_FOLDERS_DEFAULT))
|
int(sickbeard.FLATTEN_FOLDERS_DEFAULT))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue