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.
This commit is contained in:
zenyd 2017-09-30 01:54:46 +02:00
parent 9c82eea4b3
commit f480c14de9
1 changed files with 1 additions and 1 deletions

View File

@ -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!")