From 17b7fcd43a9ed61c02560b12f0442fc461077d2d Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Tue, 20 Jan 2015 11:15:41 +1030 Subject: [PATCH] convert n to string. Fixes #678 --- nzbtomedia/transcoder/transcoder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nzbtomedia/transcoder/transcoder.py b/nzbtomedia/transcoder/transcoder.py index fdc32769..0d1ebf5b 100644 --- a/nzbtomedia/transcoder/transcoder.py +++ b/nzbtomedia/transcoder/transcoder.py @@ -455,13 +455,13 @@ def buildCommands(file, newDir, movieName, bitbucket): if nzbtomedia.SEMBED and os.path.isfile(file): for subfile in get_subs(file): sub_details, result = getVideoDetails(subfile) - if result != 0 or not sub_details.get("streams"): + if not sub_details or not sub_details.get("streams"): continue lan = os.path.splitext(os.path.splitext(subfile)[0])[1] command.extend(['-i', subfile]) meta_cmd.extend(['-metadata:s:s:' + str(len(s_mapped) + n), 'language=' + lan[1:]]) n += 1 - map_cmd.extend(['-map', n + ':0']) + map_cmd.extend(['-map', str(n) + ':0']) if not nzbtomedia.ALLOWSUBS or (not s_mapped and not n): sub_cmd.extend(['-sn'])