FIX:fix for enabling DDL as a provider within the GUI requiring a restart for the monitor to start, FIX: fix for enabling CDH as an option within the GUI requiring a restart for the monitor to start

This commit is contained in:
evilhero 2019-02-27 16:17:46 -05:00
parent bc88a3ff01
commit 15f6d8b3cd
1 changed files with 20 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import os
import glob
import codecs
import shutil
import threading
import re
import ConfigParser
import mylar
@ -288,6 +289,7 @@ _CONFIG_DEFINITIONS = OrderedDict({
'ENABLE_DDL': (bool, 'DDL', False),
'ALLOW_PACKS': (bool, 'DDL', False),
'DDL_LOCATION': (str, 'DDL', None),
'DDL_AUTORESUME': (bool, 'DDL', True),
'AUTO_SNATCH': (bool, 'AutoSnatch', False),
'AUTO_SNATCH_SCRIPT': (str, 'AutoSnatch', None),
@ -900,6 +902,24 @@ class Config(object):
else:
logger.fdebug('Successfully created ComicTagger Settings location.')
#make sure queues are running here...
if all([mylar.NZBPOOL is None, self.POST_PROCESSING is True]) and ( all([self.NZB_DOWNLOADER == 0, self.SAB_CLIENT_POST_PROCESSING is True]) or all([self.NZB_DOWNLOADER == 1, self.NZB_CLIENT_POST_PROCESSING is True]) ):
if self.NZB_DOWNLOADER == 0:
logger.info('[SAB-MONITOR] Completed post-processing handling enabled for SABnzbd. Attempting to background load....')
elif self.NZB_DOWNLOADER == 1:
logger.info('[NZBGET-MONITOR] Completed post-processing handling enabled for NZBGet. Attempting to background load....')
mylar.NZBPOOL = threading.Thread(target=helpers.nzb_monitor, args=(mylar.NZB_QUEUE,), name="AUTO-COMPLETE-NZB")
mylar.NZBPOOL.start()
if self.NZB_DOWNLOADER == 0:
logger.info('[AUTO-COMPLETE-NZB] Succesfully started Completed post-processing handling for SABnzbd - will now monitor for completed nzbs within sabnzbd and post-process automatically...')
elif self.NZB_DOWNLOADER == 1:
logger.info('[AUTO-COMPLETE-NZB] Succesfully started Completed post-processing handling for NZBGet - will now monitor for completed nzbs within nzbget and post-process automatically...')
if all([mylar.DDLPOOL is None, self.ENABLE_DDL is True]):
mylar.DDLPOOL = threading.Thread(target=helpers.ddl_downloader, args=(mylar.DDL_QUEUE,), name='DDL-QUEUE')
mylar.DDLPOOL.start()
logger.info('[DDL-QUEUE] Succesfully started DDL Download Queuer....')
if not self.DDL_LOCATION:
self.DDL_LOCATION = self.CACHE_DIR
if self.ENABLE_DDL is True: