Specify encoding when converting hex-bytestring to string

Fixes im85288/service.upnext#313
This commit is contained in:
Odd Stråbø 2024-08-09 14:44:28 +02:00
parent 51528e95e0
commit 859a393455
1 changed files with 1 additions and 1 deletions

View File

@ -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('"', '\\"')