Skip to content

Commit

Permalink
Fix double encoding, add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelarnauts committed Jun 11, 2020
1 parent aa196ff commit 5257dfc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions resources/lib/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion resources/lib/modules/iptvsimple.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<programme start="{start}" stop="{stop}" channel="{channel}"{vod}>\n'.format(
Expand Down

0 comments on commit 5257dfc

Please sign in to comment.