From b1d7cdc1ad2ff9206044370f6621069359277cce Mon Sep 17 00:00:00 2001 From: echel0n Date: Fri, 14 Nov 2014 19:59:22 -0800 Subject: [PATCH] Fixed bug #895, automatic post-processing not being enabled when setting enabled from config. --- sickbeard/webserve.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 1199dd5f..75c2286e 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -1768,10 +1768,20 @@ class ConfigPostProcessing(MainHandler): sickbeard.PROCESS_AUTOMATICALLY = config.checkbox_to_value(process_automatically) config.change_AUTOPOSTPROCESSER_FREQUENCY(autopostprocesser_frequency) - if sickbeard.PROCESS_AUTOMATICALLY: + if sickbeard.PROCESS_AUTOMATICALLY and not sickbeard.autoPostProcesserScheduler.isAlive(): sickbeard.autoPostProcesserScheduler.silent = False - else: + try: + sickbeard.autoPostProcesserScheduler.start() + except: + pass + elif not sickbeard.PROCESS_AUTOMATICALLY: + sickbeard.autoPostProcesserScheduler.stop.set() sickbeard.autoPostProcesserScheduler.silent = True + try: + sickbeard.autoPostProcesserScheduler.join(5) + except: + pass + if unpack: if self.isRarSupported() != 'not supported': @@ -2591,11 +2601,13 @@ class ConfigSubtitles(MainHandler): if use_subtitles == "on" and not sickbeard.subtitlesFinderScheduler.isAlive(): sickbeard.subtitlesFinderScheduler.silent = False - sickbeard.subtitlesFinderScheduler.start() - else: + try: + sickbeard.subtitlesFinderScheduler.start() + except: + pass + elif not use_subtitles == "on": sickbeard.subtitlesFinderScheduler.stop.set() sickbeard.subtitlesFinderScheduler.silent = True - logger.log(u"Waiting for the SUBTITLESFINDER thread to exit") try: sickbeard.subtitlesFinderScheduler.join(5) except: