From f480c14de9480a5d7b96001ce1f2f6ab59a9384c Mon Sep 17 00:00:00 2001 From: zenyd Date: Sat, 30 Sep 2017 01:54:46 +0200 Subject: [PATCH] Write subtitle names as utf-8 byte stream to stdout non ascii characters seem to conflict with lua/mpv when writing the filename to stdout, which leads to failure in loading the subtitle. This fixes that. --- subselect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subselect.py b/subselect.py index 06b60aa..7883db8 100644 --- a/subselect.py +++ b/subselect.py @@ -88,7 +88,7 @@ class subselect : title = video.name + ".srt" s = save_subtitles(video, [subtitle], True, save_dir) if s != [] : - print(title, end="") + sys.stdout.buffer.write(title.encode("utf-8")) self.root.destroy() else : self.show_message("Download failed", "Subtitle download failed!")