From aaac02f6fceaee53c8727d73b5aa34b14bb1bc9d Mon Sep 17 00:00:00 2001 From: Uriziel Date: Tue, 21 Oct 2014 23:21:30 +0200 Subject: [PATCH] Fixed mpv problem with unicode filenames (hack?) --- syncplay/players/mplayer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/syncplay/players/mplayer.py b/syncplay/players/mplayer.py index 343a201..aca166e 100644 --- a/syncplay/players/mplayer.py +++ b/syncplay/players/mplayer.py @@ -277,7 +277,9 @@ class MplayerPlayer(BasePlayer): def sendLine(self, line): try: - line = (line.decode('utf8') + u"\n").encode('utf8') + if not isinstance(line, unicode): + line = line.decode('utf8') + line = (line + u"\n").encode('utf8') self.__process.stdin.write(line) except IOError: pass