From 0f99956d6243c1be0fc123cc58db72e6ffafe285 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Mon, 2 Jan 2017 21:09:35 +0100 Subject: [PATCH] =?UTF-8?q?postprocess:=20don=E2=80=99t=20crash=20on=20a?= =?UTF-8?q?=CC=8Aa=CC=88o=CC=88=20in=20filename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #517 --- lib/svtplay_dl/postprocess/__init__.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/svtplay_dl/postprocess/__init__.py b/lib/svtplay_dl/postprocess/__init__.py index 32d6f1d..e309d57 100644 --- a/lib/svtplay_dl/postprocess/__init__.py +++ b/lib/svtplay_dl/postprocess/__init__.py @@ -91,14 +91,14 @@ class postprocess(object): if self.stream.options.output.endswith('.mp4') is False: orig_filename = self.stream.options.output name, ext = os.path.splitext(orig_filename) - new_name = "{}.mp4".format(name) + new_name = u"{}.mp4".format(name) if self.merge_subtitle: - log.info("Muxing %s and merging its subtitle into %s", orig_filename, new_name) + log.info(u"Muxing %s and merging its subtitle into %s", orig_filename, new_name) else: - log.info("Muxing %s into %s", orig_filename, new_name) - - tempfile = "{}.temp".format(orig_filename) + log.info(u"Muxing %s into %s".format(orig_filename, new_name)) + + tempfile = u"{}.temp".format(orig_filename) arguments = ["-map", "0:v", "-map", "0:a", "-c", "copy", "-copyts", "-f", "mp4"] if ext == ".ts": arguments += ["-bsf:a", "aac_adtstoasc"] @@ -149,10 +149,10 @@ class postprocess(object): log.info("Merge audio, video and subtitle into %s", orig_filename) else: log.info("Merge audio and video into %s", orig_filename) - - tempfile = "{}.temp".format(orig_filename) + + tempfile = u"{}.temp".format(orig_filename) name = os.path.splitext(orig_filename)[0] - audio_filename = "{}.m4a".format(name) + audio_filename = u"{}.m4a".format(name) arguments = ["-c:v", "copy", "-c:a", "copy", "-f", "mp4"] cmd = [self.detect, "-i", orig_filename, "-i", audio_filename]