From 96c4a9fa408f2d17a33d3c14f1d3980acd843743 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Sat, 25 May 2013 21:05:38 +0930 Subject: [PATCH] delete check fix #133 and category check fix #134 --- autoProcess/autoProcessTV.py | 2 +- nzbToMedia.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/autoProcess/autoProcessTV.py b/autoProcess/autoProcessTV.py index 27fb0fa9..ded1a476 100644 --- a/autoProcess/autoProcessTV.py +++ b/autoProcess/autoProcessTV.py @@ -165,7 +165,7 @@ def processEpisode(dirName, nzbName=None, failed=False): Logger.info("The download succeeded. Sending process request to SickBeard") else: Logger.info("The download failed. Nothing to process") - if delete_failed and not dirName in ['sys.argv[0]','/','']: + if delete_failed and os.path.isdir(dirName) and not dirName in ['sys.argv[0]','/','']: delete(dirName) return 0 # Success (as far as this script is concerned) diff --git a/nzbToMedia.py b/nzbToMedia.py index 9c6679be..7b2f7db7 100755 --- a/nzbToMedia.py +++ b/nzbToMedia.py @@ -412,6 +412,9 @@ elif inputCategory == mlCategory: elif inputCategory == gzCategory: Logger.info("MAIN: Calling Gamez to post-process: %s", inputName) result = autoProcessGames.process(nzbDir, inputName, status) +else: + Logger.warning("MAIN: The download category %s does not match any category defines in autoProcessMedia.cfg. Exiting.", inputCategory) + sys.exit(POSTPROCESS_ERROR) if result == 0: Logger.info("MAIN: The autoProcess* script completed successfully.")