mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
Switched our config class to configObj.
nzbToMedia now fully performs manual runs for all autoProcessing scripts. autoProcessing categories are now sub-sections in the autoProcessingMedia.cfg file which allows you to have a unlimited amount of categories for your liking. nzbToMedia supports categories for all autoProcessing scripts now. Minor bug fixes and code cleanup performed during the re-code. Auto-migration code will convert old-style cfg files to new-style cfg format.
This commit is contained in:
parent
027c3e5a43
commit
b7fc74b3fd
22 changed files with 4473 additions and 572 deletions
|
@ -95,8 +95,9 @@ if migratecfg().migrate():
|
|||
Logger.info("MAIN: Loading config from %s", config.CONFIG_FILE)
|
||||
else:
|
||||
sys.exit(-1)
|
||||
|
||||
# headphones category
|
||||
hpCategory = (config().get("HeadPhones", "hpCategory")).split(',') # music
|
||||
categories = config.get_categories(["HeadPhones"])
|
||||
|
||||
WakeUp()
|
||||
|
||||
|
@ -178,10 +179,13 @@ else:
|
|||
Logger.warn("MAIN: Invalid number of arguments received from client.")
|
||||
Logger.info("MAIN: Running autoProcessMusic as a manual run...")
|
||||
|
||||
for dirName in get_dirnames("HeadPhones", hpCategory[0]):
|
||||
Logger.info("MAIN: Calling Headphones to post-process: %s", dirName)
|
||||
result = result = autoProcessMusic().process(dirName, dirName, 0)
|
||||
if result != 0: break
|
||||
for section, category in categories.items():
|
||||
for dirName in get_dirnames(section, category):
|
||||
Logger.info("MAIN: Calling " + section + ":" + category + " to post-process: %s", dirName)
|
||||
results = autoProcessMusic().process(dirName, dirName, 0)
|
||||
if results != 0:
|
||||
result = 1
|
||||
Logger.info("MAIN: A problem was reported in the autoProcessMusic script.")
|
||||
|
||||
if result == 0:
|
||||
Logger.info("MAIN: The autoProcessMusic script completed successfully.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue