Fixed issues in the nzbTo* scripts with manual runs not properly sending the categories to be processed.

Fixed issue in TorrentToMedia with noFlatten variable for HeadPhones.

Changed name of function get_categories to get_sections in nzbToMediaUtil.

Added code in get_dirnames to properly return back the directory could not find anything to process in.
This commit is contained in:
echel0n 2014-04-05 20:56:12 -07:00
commit c3410fba8f
10 changed files with 70 additions and 72 deletions

View file

@ -97,7 +97,7 @@ else:
sys.exit(-1)
# headphones category
categories = config.get_categories(["HeadPhones"])
sections = config.get_sections(["HeadPhones"])
WakeUp()
@ -179,13 +179,13 @@ else:
Logger.warn("MAIN: Invalid number of arguments received from client.")
Logger.info("MAIN: Running autoProcessMusic as a manual run...")
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.")
for section, categories in sections.items():
for category in categories:
dirNames = get_dirnames(section, category)
for dirName in dirNames:
Logger.info("MAIN: Calling " + section + ":" + category + " to post-process: %s", dirName)
results = autoProcessMusic().process(dirName, dirName, 0, inputCategory=category)
if results != 0:result = results
if result == 0:
Logger.info("MAIN: The autoProcessMusic script completed successfully.")
@ -195,3 +195,4 @@ else:
Logger.info("MAIN: A problem was reported in the autoProcessMusic script.")
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
sys.exit(config.NZBGET_POSTPROCESS_ERROR)