From 859a39345597dd728381c992771ccf08689caf09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= <oddstr13@openshell.no>
Date: Fri, 9 Aug 2024 14:44:28 +0200
Subject: [PATCH] Specify encoding when converting hex-bytestring to string
 Fixes im85288/service.upnext#313

---
 jellyfin_kodi/helper/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jellyfin_kodi/helper/utils.py b/jellyfin_kodi/helper/utils.py
index 3e2b58cd..c745cb32 100644
--- a/jellyfin_kodi/helper/utils.py
+++ b/jellyfin_kodi/helper/utils.py
@@ -122,7 +122,7 @@ def event(method, data=None, sender=None, hexlify=False):
     sender = sender or "plugin.video.jellyfin"
 
     if hexlify:
-        data = str(binascii.hexlify(json.dumps(data).encode()))
+        data = str(binascii.hexlify(json.dumps(data).encode()), "utf-8")
 
     data = '"[%s]"' % json.dumps(data).replace('"', '\\"')