From 5a984da5c974957c22f910cf5f0693e408408c75 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Wed, 30 Jul 2014 08:54:35 +0930 Subject: [PATCH] bug fixes for #474 --- nzbtomedia/autoProcess/autoProcessTV.py | 2 +- nzbtomedia/transcoder/transcoder.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nzbtomedia/autoProcess/autoProcessTV.py b/nzbtomedia/autoProcess/autoProcessTV.py index 0b715e6a..15cd06c2 100644 --- a/nzbtomedia/autoProcess/autoProcessTV.py +++ b/nzbtomedia/autoProcess/autoProcessTV.py @@ -278,7 +278,7 @@ class autoProcessTV: if not os.path.exists(dirName): logger.debug("The directory %s has been removed. Renaming was successful." % (dirName), section) - return 0 + return [0, "%s: Successfully post-processed %s" % (section, inputName) ] elif current_numMissing < start_numMissing: logger.debug( "The number of missing episodes changes from %s to %s and then remained the same for %s minutes. Consider this successful" % diff --git a/nzbtomedia/transcoder/transcoder.py b/nzbtomedia/transcoder/transcoder.py index 174fe1eb..41d14d50 100644 --- a/nzbtomedia/transcoder/transcoder.py +++ b/nzbtomedia/transcoder/transcoder.py @@ -305,7 +305,9 @@ def buildCommands(file, newDir): subs1 = [] burnt = 0 for lan in nzbtomedia.SLANGUAGES: - subs1 = [ item for item in subStreams if item["tags"]["language"] == lan ] + try: + subs1 = [ item for item in subStreams if item["tags"]["language"] == lan ] + except: subs1 = [] if nzbtomedia.BURN and not subs1 and not burnt: for subfile in get_subs(file): if lan in os.path.split(subfile)[1]: