mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 18:47:09 -07:00
Monkey Patched our config class.
Fixed code for enabled check. Tweaked a few things here and there.
This commit is contained in:
parent
cd0eb9a83a
commit
0ca0e43752
14 changed files with 72 additions and 82 deletions
|
@ -102,10 +102,10 @@ from nzbtomedia.nzbToMediaConfig import config
|
|||
from nzbtomedia.nzbToMediaUtil import nzbtomedia_configure_logging, WakeUp, get_dirnames
|
||||
|
||||
# run migrate to convert old cfg to new style cfg plus fix any cfg missing values/options.
|
||||
if config.migrate():
|
||||
if config().migrate():
|
||||
# check to write settings from nzbGet UI to autoProcessMedia.cfg.
|
||||
if os.environ.has_key('NZBOP_SCRIPTDIR'):
|
||||
config.addnzbget()
|
||||
config().addnzbget()
|
||||
|
||||
nzbtomedia_configure_logging(config.LOG_FILE)
|
||||
Logger = logging.getLogger(__name__)
|
||||
|
@ -197,12 +197,12 @@ else:
|
|||
result = 0
|
||||
|
||||
# init sub-sections
|
||||
subsections = config.get_subsections(["NzbDrone"])
|
||||
subsections = config().get_subsections(["NzbDrone"])
|
||||
|
||||
Logger.warn("MAIN: Invalid number of arguments received from client.")
|
||||
for section, subsection in subsections.items():
|
||||
for category in subsection:
|
||||
if config.isenabled(section, category):
|
||||
if config().isenabled(section, category):
|
||||
dirNames = get_dirnames(section, category)
|
||||
for dirName in dirNames:
|
||||
Logger.info("MAIN: nzbToNzbDrone running %s:%s as a manual run...", section, category)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue