Merge pull request #400 from Syncplay/update-mpv-jsonipc-vendor-code-2
Update mpv json ipc vendor code
This commit is contained in:
commit
77ce05d02d
@ -112,6 +112,10 @@ class WindowsSocket(threading.Thread):
|
|||||||
except EOFError:
|
except EOFError:
|
||||||
if self.quit_callback:
|
if self.quit_callback:
|
||||||
self.quit_callback()
|
self.quit_callback()
|
||||||
|
except Exception as ex:
|
||||||
|
log.error("Pipe connection died.", exc_info=1)
|
||||||
|
if self.quit_callback:
|
||||||
|
self.quit_callback()
|
||||||
|
|
||||||
class UnixSocket(threading.Thread):
|
class UnixSocket(threading.Thread):
|
||||||
"""
|
"""
|
||||||
@ -159,6 +163,7 @@ class UnixSocket(threading.Thread):
|
|||||||
def run(self):
|
def run(self):
|
||||||
"""Process socket events. Do not run this directly. Use *start*."""
|
"""Process socket events. Do not run this directly. Use *start*."""
|
||||||
data = b''
|
data = b''
|
||||||
|
try:
|
||||||
while True:
|
while True:
|
||||||
current_data = self.socket.recv(1024)
|
current_data = self.socket.recv(1024)
|
||||||
if current_data == b'':
|
if current_data == b'':
|
||||||
@ -175,6 +180,8 @@ class UnixSocket(threading.Thread):
|
|||||||
json_data = json.loads(item)
|
json_data = json.loads(item)
|
||||||
self.callback(json_data)
|
self.callback(json_data)
|
||||||
data = b''
|
data = b''
|
||||||
|
except Exception as ex:
|
||||||
|
log.error("Socket connection died.", exc_info=1)
|
||||||
if self.quit_callback:
|
if self.quit_callback:
|
||||||
self.quit_callback()
|
self.quit_callback()
|
||||||
|
|
||||||
|
|||||||
2
syncplay/vendor/python_mpv_jsonipc/setup.py
vendored
2
syncplay/vendor/python_mpv_jsonipc/setup.py
vendored
@ -6,7 +6,7 @@ with open("README.md", "r") as fh:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='python-mpv-jsonipc',
|
name='python-mpv-jsonipc',
|
||||||
version='1.1.11',
|
version='1.1.13',
|
||||||
author="Ian Walton",
|
author="Ian Walton",
|
||||||
author_email="iwalton3@gmail.com",
|
author_email="iwalton3@gmail.com",
|
||||||
description="Python API to MPV using JSON IPC",
|
description="Python API to MPV using JSON IPC",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user