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:
echel0n 2014-04-12 05:51:37 -07:00
commit d2e3275562
11 changed files with 77 additions and 80 deletions

View file

@ -151,20 +151,20 @@ elif len(sys.argv) >= nzbtomedia.SABNZB_0717_NO_OF_ARGUMENTS:
result = autoProcessComics().processEpisode(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent, sys.argv[5])
else:
result = 0
section = "Mylar"
logger.warning("Invalid number of arguments received from client.")
section = "Mylar"
for category in nzbtomedia.SUBSECTIONS[section]:
if nzbtomedia.SUBSECTIONS[section][category].isenabled():
dirNames = get_dirnames(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("nzbToMylar running %s:%s as a manual run on folder %s ...", section, category, dirName)
results = autoProcessComics().processEpisode(dirName, os.path.basename(dirName), 0, inputCategory=category)
logger.postprocess("nzbToMylar running %s:%s as a manual run on folder %s ...", section, subsection, dirName)
results = autoProcessComics().processEpisode(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, category, dirName)
logger.error("A problem was reported when trying to manually run %s:%s on folder %s ...", section, subsection, dirName)
else:
logger.postprocess("nzbToMylar %s:%s is DISABLED, you can enable this in autoProcessMedia.cfg ...", section, category)
logger.postprocess("nzbToMylar %s:%s is DISABLED, you can enable this in autoProcessMedia.cfg ...", section, subsection)
if result == 0:
logger.postprocess("The autoProcessComics script completed successfully.")