From e2068298345e106b5ba08c6f74a015dd1dabcfdd Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 13 Apr 2014 16:27:12 -0700 Subject: [PATCH] Fixed bug that was caused by manual run of torrentToMedia --- TorrentToMedia.py | 3 ++- nzbtomedia/autoProcess/autoProcessMovie.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 3fddcae2..ebfe771d 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -201,7 +201,7 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID) logger.postprocess("Calling Gamez:" + inputCategory + " to post-process: %s", inputName) result = autoProcessGames().process(outputDestination, inputName, status, nzbtomedia.CLIENTAGENT, inputCategory) - if result == 1: + if result == 1 and not nzbtomedia.CLIENTAGENT == 'manual': logger.error("A problem was reported in the autoProcess* script. If torrent was paused we will resume seeding") resume_torrent(nzbtomedia.CLIENTAGENT, TorrentClass, inputHash, inputID, result, inputName) @@ -338,6 +338,7 @@ def main(): # check if this is a manual run if inputDirectory is None: + nzbtomedia.CLIENTAGENT = 'manual' logger.warning("Invalid number of arguments received from client, Switching to manual run mode ...") for section, subsection in nzbtomedia.SUBSECTIONS.items(): for category in subsection: diff --git a/nzbtomedia/autoProcess/autoProcessMovie.py b/nzbtomedia/autoProcess/autoProcessMovie.py index 8fdd49af..2c784c2e 100644 --- a/nzbtomedia/autoProcess/autoProcessMovie.py +++ b/nzbtomedia/autoProcess/autoProcessMovie.py @@ -268,7 +268,7 @@ class autoProcessMovie: delete(dirName) return 0 # success - if not release_id: + if not download_id or not release_id: if clientAgent in ['utorrent', 'transmission', 'deluge'] : return 1 # just to be sure TorrentToMedia doesn't start deleting files as we havent verified changed status. else: