From 5257dfc58d45a816c9955758b5c3689906dfc5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Thu, 11 Jun 2020 20:09:30 +0200 Subject: [PATCH] Fix double encoding, add logging --- resources/lib/functions.py | 6 ++++-- resources/lib/modules/iptvsimple.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/lib/functions.py b/resources/lib/functions.py index f86ea79..6673626 100644 --- a/resources/lib/functions.py +++ b/resources/lib/functions.py @@ -37,15 +37,17 @@ def refresh(): def play_from_contextmenu(): """Play an item from the Context Menu in Kodi 18""" - # Use the direct uri if we have any + # Use the direct URI if we have any stream = ContextMenu.get_direct_uri() if stream: + _LOGGER.debug('Playing using direct URI: %s', stream) kodiutils.execute_builtin('PlayMedia', stream) return - # Construct an uri based on the timestamp of the selection + # Construct an URI based on the timestamp of the selection stream = ContextMenu.get_uri_by_timestamp() if stream: + _LOGGER.debug('Playing using generated URI: %s', stream) kodiutils.execute_builtin('PlayMedia', stream) return diff --git a/resources/lib/modules/iptvsimple.py b/resources/lib/modules/iptvsimple.py index 1df3267..3f20694 100644 --- a/resources/lib/modules/iptvsimple.py +++ b/resources/lib/modules/iptvsimple.py @@ -171,7 +171,7 @@ def write_epg(cls, epg): # We also use a clever way to hide the stream in the label so # Kodi 18 can access the direct stream title = '%s [COLOR green][B]•[/B][/COLOR][CR][COLOR vod="%s"][/COLOR]' % ( - cls._xml_encode(title), cls._xml_encode(item.get('stream')) + title, item.get('stream') ) program = '\n'.format(