Fixed a bunch of issues that where present in TorrentToMedia and our config class including the migration code.

Added in manual run for TorrentToMedia.

All autoProcessing scripts now auto-detect the correct section based on sub-section.

NzbDrone support is 90% done but is not functional ... YET!

Lots more I'm sure but I wanted this released for those that where having issues.
This commit is contained in:
echel0n 2014-04-07 01:42:55 -07:00
commit 7d4ccf53cc
17 changed files with 715 additions and 305 deletions

View file

@ -95,9 +95,6 @@ if config.migrate():
else:
sys.exit(-1)
# headphones category
sections = config.get_sections(["HeadPhones"])
WakeUp()
# NZBGet V11+
@ -175,16 +172,20 @@ elif len(sys.argv) >= config.SABNZB_0717_NO_OF_ARGUMENTS:
else:
result = 0
Logger.warn("MAIN: Invalid number of arguments received from client.")
Logger.info("MAIN: Running autoProcessMusic as a manual run...")
# init sub-sections
subsections = config.get_subsections(["HeadPhones"])
for section, categories in sections.items():
for category in categories:
Logger.warn("MAIN: Invalid number of arguments received from client.")
for section, subsection in subsections.items():
for category in subsection:
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
Logger.info("MAIN: nzbToHeadPhones running %s:%s as a manual run...", section, subsection)
results = autoProcessMusic(dirName, inputName=os.path.basename(dirName), status=0, clientAgent="manual",
inputCategory=category)
if results != 0:
result = results
Logger.info("MAIN: A problem was reported when trying to manually run %s:%s.", section, subsection)
if result == 0:
Logger.info("MAIN: The autoProcessMusic script completed successfully.")