mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
Fixed bugs in nzbTo* scripts.
autoProcessTV now gets movie_id even for previously post-processed movies so that we can skip further post-processing gracefully. Code cleanup misc ...
This commit is contained in:
parent
f9fd1646d6
commit
d2e3275562
11 changed files with 77 additions and 80 deletions
|
@ -210,20 +210,20 @@ elif len(sys.argv) >= nzbtomedia.SABNZB_0717_NO_OF_ARGUMENTS:
|
|||
result = autoProcessMovie().process(sys.argv[1], sys.argv[2], status=sys.argv[7], inputCategory=sys.argv[5], clientAgent = "sabnzbd", download_id='')
|
||||
else:
|
||||
result = 0
|
||||
section = "CouchPotato"
|
||||
|
||||
logger.warning("Invalid number of arguments received from client.")
|
||||
for section, subsection in nzbtomedia.SUBSECTIONS['CouchPotato'].items():
|
||||
for category in subsection:
|
||||
if nzbtomedia.CFG[section][category].isenabled():
|
||||
dirNames = get_dirnames(section, category)
|
||||
for dirName in dirNames:
|
||||
logger.postprocess("Running %s:%s as a manual run on folder %s ...", section, category, dirName)
|
||||
results = autoProcessMovie().process(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
if results != 0:
|
||||
result = results
|
||||
logger.error("A problem was reported when trying to manually run %s:%s on folder %s ...", section, category, dirName)
|
||||
else:
|
||||
logger.warning("%s:%s is DISABLED, you can enable this in autoProcessMedia.cfg ...", section, category)
|
||||
for subsection in nzbtomedia.CFG[section]:
|
||||
if nzbtomedia.CFG[section][subsection].isenabled():
|
||||
dirNames = get_dirnames(section, subsection)
|
||||
for dirName in dirNames:
|
||||
logger.postprocess("Running %s:%s as a manual run on folder %s ...", section, subsection, dirName)
|
||||
results = autoProcessMovie().process(dirName, os.path.basename(dirName), 0, inputCategory=subsection)
|
||||
if results != 0:
|
||||
result = results
|
||||
logger.error("A problem was reported when trying to manually run %s:%s on folder %s ...", section, subsection, dirName)
|
||||
else:
|
||||
logger.warning("%s:%s is DISABLED, you can enable this in autoProcessMedia.cfg ...", section, subsection)
|
||||
|
||||
if result == 0:
|
||||
logger.postprocess("The script completed successfully.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue