From 18ad8e6f89cc0f013c7acbc2bfd3fb66c5b22dad Mon Sep 17 00:00:00 2001 From: mcarlton00 Date: Sun, 5 Mar 2023 21:15:08 -0500 Subject: [PATCH] Fix the formatting of the upnext notification --- resources/lib/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 59c0bc6..9612e9b 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -88,8 +88,11 @@ def send_event_notification(method, data=None, hexlify=False): if hexlify: # Used exclusively for the upnext plugin data_str = ensure_text(binascii.hexlify(ensure_binary(data_str))) + data = '["{}"]'.format(data_str) + else: + data = '"[{}]"'.format(data_str.replace('"', '\\"')) + sender = 'plugin.video.jellycon' - data = '"[{}]"'.format(data_str.replace('"', '\\"')) xbmc.executebuiltin('NotifyAll({}, {}, {})'.format(sender, method, data))