mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Fixed trakt library update issues.
This commit is contained in:
parent
b484192390
commit
cdd190e1e7
@ -1171,6 +1171,13 @@ def halt():
|
||||
|
||||
logger.log(u"Aborting all threads")
|
||||
|
||||
events.stop.set()
|
||||
logger.log(u"Waiting for the EVENTS thread to exit")
|
||||
try:
|
||||
events.join(10)
|
||||
except:
|
||||
pass
|
||||
|
||||
dailySearchScheduler.stop.set()
|
||||
logger.log(u"Waiting for the DAILYSEARCH thread to exit")
|
||||
try:
|
||||
@ -1249,13 +1256,6 @@ def halt():
|
||||
except:
|
||||
pass
|
||||
|
||||
events.stop.set()
|
||||
logger.log(u"Waiting for the EVENTS thread to exit")
|
||||
try:
|
||||
events.join(10)
|
||||
except:
|
||||
pass
|
||||
|
||||
__INITIALIZED__ = False
|
||||
started = False
|
||||
|
||||
|
@ -39,6 +39,7 @@ class Scheduler(threading.Thread):
|
||||
self.silent = silent
|
||||
self.stop = threading.Event()
|
||||
self.force = False
|
||||
self.daemon = False
|
||||
|
||||
def timeLeft(self):
|
||||
return self.cycleTime - (datetime.datetime.now() - self.lastRun)
|
||||
|
@ -60,10 +60,10 @@ class TraktChecker():
|
||||
logger.log(u"Could not connect to trakt service, aborting library check", logger.ERROR)
|
||||
return
|
||||
|
||||
return filter(lambda x: int(indexerid) in [int(x.tvdb_id), int(x.tvrage_id)], library)
|
||||
return filter(lambda x: int(indexerid) in [int(x['tvdb_id']) or 0, int(x['tvrage_id'])] or 0, library)
|
||||
|
||||
def syncLibrary(self):
|
||||
logger.log(u"Syncing library to trakt.tv show library", logger.DEBUG)
|
||||
logger.log(u"Syncing library to Trakt.tv show library", logger.DEBUG)
|
||||
if sickbeard.showList:
|
||||
for myShow in sickbeard.showList:
|
||||
self.addShowToTraktLibrary(myShow)
|
||||
|
@ -2769,7 +2769,7 @@ class NewHomeAddShows(MainHandler):
|
||||
return
|
||||
|
||||
map(final_results.append,
|
||||
([int(show['tvdb_id']), show['url'], show['title'], show['overview'],
|
||||
([int(show['tvdb_id'] or 0) if sickbeard.TRAKT_DEFAULT_INDEXER == 1 else int(show['tvdb_id'] or 0), show['url'], show['title'], show['overview'],
|
||||
datetime.date.fromtimestamp(int(show['first_aired']) / 1000.0).strftime('%Y%m%d')] for show in
|
||||
recommendedlist if not helpers.findCertainShow(sickbeard.showList, indexerid=int(show['tvdb_id']))))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user