From 4068af71c19c68a067ce24f26c6044c42bd50bce Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Thu, 22 Jan 2015 07:02:06 +1030 Subject: [PATCH] use returned path from Transcoder for SickBeard Processing. Fixes #678 --- nzbtomedia/autoProcess/autoProcessTV.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nzbtomedia/autoProcess/autoProcessTV.py b/nzbtomedia/autoProcess/autoProcessTV.py index 9e7cf5fc..6c40156b 100644 --- a/nzbtomedia/autoProcess/autoProcessTV.py +++ b/nzbtomedia/autoProcess/autoProcessTV.py @@ -189,6 +189,15 @@ class autoProcessTV: status = 1 failed = 1 + if status == 0 and nzbtomedia.TRANSCODE == 1: # only transcode successful downlaods + result, newDirName = transcoder.Transcode_directory(dirName) + if result == 0: + logger.debug("SUCCESS: Transcoding succeeded for files in %s" % (dirName), section) + dirName = newDirName + else: + logger.error("FAILED: Transcoding failed for files in %s" % (dirName), section) + return [1, "%s: Failed to post-process - Transcoding failed" % (section) ] + # configure SB params to pass fork_params['quiet'] = 1 if inputName is not None: @@ -235,15 +244,6 @@ class autoProcessTV: rmDir(dirName) return [1, "%s: Failed to post-process. %s does not support failed downloads" % (section, section) ] # Return as failed to flag this in the downloader. - if status == 0 and nzbtomedia.TRANSCODE == 1: # only transcode successful downlaods - result, newDirName = transcoder.Transcode_directory(dirName) - if result == 0: - logger.debug("SUCCESS: Transcoding succeeded for files in %s" % (dirName), section) - dirName = newDirName - else: - logger.error("FAILED: Transcoding failed for files in %s" % (dirName), section) - return [1, "%s: Failed to post-process - Transcoding failed" % (section) ] - url = None if section == "SickBeard": url = "%s%s:%s%s/home/postprocess/processEpisode" % (protocol,host,port,web_root)