From 1b4eacd7e9a724afeef69481a2a5dbce120fd027 Mon Sep 17 00:00:00 2001 From: lodesmets <31108717+lodesmets@users.noreply.github.com> Date: Mon, 19 Aug 2019 23:05:45 +0200 Subject: [PATCH] Fixed error Fixed error TypeError: a bytes-like object is required, not 'str' This might not be the best solution, I can program in python, but I'm not a master in it. It works now, but it might not be optimized --- plex_mpv_shim/gdm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plex_mpv_shim/gdm.py b/plex_mpv_shim/gdm.py index aa5f81f..033d7fb 100644 --- a/plex_mpv_shim/gdm.py +++ b/plex_mpv_shim/gdm.py @@ -221,9 +221,9 @@ class PlexGDM: update = { 'server' : response.get('from')[0] } #Check if we had a positive HTTP response - if "200 OK" in response.get('data'): + if bytes("200 OK",'utf-8') in response.get('data'): - for each in response.get('data').split('\n'): + for each in str(response.get('data')).split('\\r\\n'): update['discovery'] = "auto" update['owned']='1'