use returned path from Transcoder for SickBeard Processing. Fixes #678

This commit is contained in:
clinton-hall 2015-01-22 07:02:06 +10:30
commit 4068af71c1

View file

@ -189,6 +189,15 @@ class autoProcessTV:
status = 1 status = 1
failed = 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 # configure SB params to pass
fork_params['quiet'] = 1 fork_params['quiet'] = 1
if inputName is not None: if inputName is not None:
@ -235,15 +244,6 @@ class autoProcessTV:
rmDir(dirName) 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. 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 url = None
if section == "SickBeard": if section == "SickBeard":
url = "%s%s:%s%s/home/postprocess/processEpisode" % (protocol,host,port,web_root) url = "%s%s:%s%s/home/postprocess/processEpisode" % (protocol,host,port,web_root)