Fixes mpv support

This commit is contained in:
Alberto Sottile 2018-04-27 00:19:05 +02:00
parent 4fb771a450
commit fe224c0316
2 changed files with 3 additions and 3 deletions

View File

@ -324,9 +324,9 @@ class MplayerPlayer(BasePlayer):
if 'TERM' in env:
del env['TERM']
if filePath:
self.__process = subprocess.Popen(call, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.__getCwd(filePath, env), env=env)
self.__process = subprocess.Popen(call, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.__getCwd(filePath, env), env=env, bufsize=0)
else:
self.__process = subprocess.Popen(call, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
self.__process = subprocess.Popen(call, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT, env=env, bufsize=0)
threading.Thread.__init__(self, name="MPlayer Listener")

View File

@ -267,7 +267,7 @@ class NewMpvPlayer(OldMpvPlayer):
self.mpvErrorCheck(line)
if "<chat>" in line:
line = line.decode("utf-8").replace(constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER, "\\").encode("utf-8")
line = line.replace(constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER, "\\")
self._listener.sendChat(line[6:-7])
if "<get_syncplayintf_options>" in line: