1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 03:22:22 -05:00

Fix for threading schedualers and subtitles.

This commit is contained in:
echel0n 2014-07-19 17:03:23 -07:00
parent 24cd235988
commit 0cdd1cf813
3 changed files with 5 additions and 8 deletions

View File

@ -14,7 +14,6 @@ class Events(threading.Thread):
super(Events, self).__init__()
self.queue = Queue()
self.daemon = True
self.alive = True
self.callback = callback
self.name = "EVENT-QUEUE"
self.stop = threading.Event()

View File

@ -39,7 +39,6 @@ class Scheduler(threading.Thread):
self.silent = silent
self.stop = threading.Event()
self.force = False
self.alive = True
def timeLeft(self):
return self.cycleTime - (datetime.datetime.now() - self.lastRun)

View File

@ -2398,8 +2398,7 @@ class ConfigSubtitles(MainHandler):
if subtitles_finder_frequency == '' or subtitles_finder_frequency is None:
subtitles_finder_frequency = 1
if use_subtitles == "on":
if not sickbeard.subtitlesFinderScheduler.isAlive():
if use_subtitles == "on" and not sickbeard.subtitlesFinderScheduler.isAlive():
sickbeard.subtitlesFinderScheduler.silent = False
sickbeard.subtitlesFinderScheduler.start()
else:
@ -2407,7 +2406,7 @@ class ConfigSubtitles(MainHandler):
sickbeard.subtitlesFinderScheduler.silent = True
logger.log(u"Waiting for the SUBTITLESFINDER thread to exit")
try:
sickbeard.subtitlesFinderScheduler.join()
sickbeard.subtitlesFinderScheduler.join(5)
except:
pass