Merge pull request #899 from oddstr13/pr-hexlify-encode-1

Specify encoding when converting hex-bytestring to string
This commit is contained in:
Odd Stråbø 2024-08-09 15:33:05 +02:00 committed by GitHub
commit 2aa790c88b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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('"', '\\"')