mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
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:
parent
0ce4bb601d
commit
7d4ccf53cc
17 changed files with 715 additions and 305 deletions
|
@ -149,9 +149,6 @@ if config.migrate():
|
|||
else:
|
||||
sys.exit(-1)
|
||||
|
||||
# sickbeard category
|
||||
sections = config.get_sections(["SickBeard"])
|
||||
|
||||
WakeUp()
|
||||
|
||||
# NZBGet V11+
|
||||
|
@ -232,16 +229,20 @@ elif len(sys.argv) >= config.SABNZB_0717_NO_OF_ARGUMENTS:
|
|||
else:
|
||||
result = 0
|
||||
|
||||
Logger.debug("MAIN: Invalid number of arguments received from client.")
|
||||
Logger.info("MAIN: Running autoProcessTV as a manual run...")
|
||||
# init sub-sections
|
||||
subsections = config.get_subsections(["SickBeard", "NzbDrone"])
|
||||
|
||||
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 = autoProcessTV().processEpisode(dirName, dirName, 0, inputCategory=category)
|
||||
if results != 0:result = results
|
||||
Logger.info("MAIN: nzbTo%s running %s:%s as a manual run...", section, section, subsection)
|
||||
results = autoProcessTV(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 autoProcessTV script completed successfully.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue