From 07c9fffab77907ede16763ded4ba021af3d854ba Mon Sep 17 00:00:00 2001 From: mcarlton00 Date: Tue, 11 Feb 2020 23:09:55 -0500 Subject: [PATCH] Fix kodi 19 websocket control --- jellyfin_kodi/jellyfin/websocket.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jellyfin_kodi/jellyfin/websocket.py b/jellyfin_kodi/jellyfin/websocket.py index 63d471ab..b0d91f34 100644 --- a/jellyfin_kodi/jellyfin/websocket.py +++ b/jellyfin_kodi/jellyfin/websocket.py @@ -545,8 +545,8 @@ class WebSocket(object): return False result = result.lower() - value = key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" - hashed = base64.encodestring(hashlib.sha1(value).digest()).strip().lower() + value = key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11".encode() + hashed = base64.encodestring(hashlib.sha1(value).digest()).strip().lower().decode() return hashed == result def _read_headers(self): @@ -795,11 +795,11 @@ class WebSocket(object): def _recv_line(self): line = [] while True: - c = self._recv(1) + c = self._recv(1).decode() line.append(c) if c == "\n": break - return b"".join(line) + return "".join(line) class WebSocketApp(object):