mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Fix for threading schedualers and subtitles.
This commit is contained in:
parent
24cd235988
commit
0cdd1cf813
@ -14,7 +14,6 @@ class Events(threading.Thread):
|
|||||||
super(Events, self).__init__()
|
super(Events, self).__init__()
|
||||||
self.queue = Queue()
|
self.queue = Queue()
|
||||||
self.daemon = True
|
self.daemon = True
|
||||||
self.alive = True
|
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
self.name = "EVENT-QUEUE"
|
self.name = "EVENT-QUEUE"
|
||||||
self.stop = threading.Event()
|
self.stop = threading.Event()
|
||||||
|
@ -39,7 +39,6 @@ class Scheduler(threading.Thread):
|
|||||||
self.silent = silent
|
self.silent = silent
|
||||||
self.stop = threading.Event()
|
self.stop = threading.Event()
|
||||||
self.force = False
|
self.force = False
|
||||||
self.alive = True
|
|
||||||
|
|
||||||
def timeLeft(self):
|
def timeLeft(self):
|
||||||
return self.cycleTime - (datetime.datetime.now() - self.lastRun)
|
return self.cycleTime - (datetime.datetime.now() - self.lastRun)
|
||||||
|
@ -2398,8 +2398,7 @@ class ConfigSubtitles(MainHandler):
|
|||||||
if subtitles_finder_frequency == '' or subtitles_finder_frequency is None:
|
if subtitles_finder_frequency == '' or subtitles_finder_frequency is None:
|
||||||
subtitles_finder_frequency = 1
|
subtitles_finder_frequency = 1
|
||||||
|
|
||||||
if use_subtitles == "on":
|
if use_subtitles == "on" and not sickbeard.subtitlesFinderScheduler.isAlive():
|
||||||
if not sickbeard.subtitlesFinderScheduler.isAlive():
|
|
||||||
sickbeard.subtitlesFinderScheduler.silent = False
|
sickbeard.subtitlesFinderScheduler.silent = False
|
||||||
sickbeard.subtitlesFinderScheduler.start()
|
sickbeard.subtitlesFinderScheduler.start()
|
||||||
else:
|
else:
|
||||||
@ -2407,7 +2406,7 @@ class ConfigSubtitles(MainHandler):
|
|||||||
sickbeard.subtitlesFinderScheduler.silent = True
|
sickbeard.subtitlesFinderScheduler.silent = True
|
||||||
logger.log(u"Waiting for the SUBTITLESFINDER thread to exit")
|
logger.log(u"Waiting for the SUBTITLESFINDER thread to exit")
|
||||||
try:
|
try:
|
||||||
sickbeard.subtitlesFinderScheduler.join()
|
sickbeard.subtitlesFinderScheduler.join(5)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user