Skip to content

Commit

Permalink
fix(core): Fixes Kodi 18 play behaviour & sorting of main menu list
Browse files Browse the repository at this point in the history
  • Loading branch information
asciidisco committed Jul 25, 2017
1 parent e74ab27 commit 1e14c2e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
9 changes: 6 additions & 3 deletions addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,12 @@ def show_date_list(_session):
log('Main menu')
epg = get_epg(_session)
for date in epg.keys():
log('DATE: ' + str(date))
url = build_url({'date': date})
li = xbmcgui.ListItem(label=date)
li.setInfo('video', {'date': date})
xbmcplugin.addDirectoryItem(handle=plugin_handle, url=url, listitem=li, isFolder=True)
xbmcplugin.addSortMethod(handle=plugin_handle, sortMethod=xbmcplugin.SORT_METHOD_LABEL)
xbmcplugin.addSortMethod(handle=plugin_handle, sortMethod=xbmcplugin.SORT_METHOD_DATE)
xbmcplugin.endOfDirectory(plugin_handle)

def show_matches_list(_session, game_date):
Expand All @@ -265,7 +267,7 @@ def show_matches_list(_session, game_date):
url = build_url({'hash': item.get('hash'), 'date': game_date})
li = xbmcgui.ListItem(label=item.get('title'))
xbmcplugin.addDirectoryItem(handle=plugin_handle, url=url, listitem=li, isFolder=True)
xbmcplugin.addSortMethod(handle=plugin_handle, sortMethod=xbmcplugin.SORT_METHOD_LABEL)
xbmcplugin.addSortMethod(handle=plugin_handle, sortMethod=xbmcplugin.SORT_METHOD_NONE)
xbmcplugin.endOfDirectory(plugin_handle)

def show_match_details(_session, game_hash, game_date):
Expand All @@ -282,8 +284,9 @@ def show_match_details(_session, game_hash, game_date):
url = build_url({'hash': item.get('hash'), 'date': game_date, 'stream': stream})
li = xbmcgui.ListItem(label=stream)
li.setProperty('IsPlayable', 'true')
li.setInfo('video', {'title': stream, 'genre': 'Sports'})
xbmcplugin.addDirectoryItem(handle=plugin_handle, url=url, listitem=li, isFolder=False)
xbmcplugin.addSortMethod(handle=plugin_handle, sortMethod=xbmcplugin.SORT_METHOD_LABEL)
xbmcplugin.addSortMethod(handle=plugin_handle, sortMethod=xbmcplugin.SORT_METHOD_NONE)
xbmcplugin.endOfDirectory(plugin_handle)

def play(_session, name, game_hash, game_date):
Expand Down
5 changes: 3 additions & 2 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.telekom-sport" version="1.0.0" name="Telekom Sport" provider-name="asciidisco">
<addon id="plugin.video.telekom-sport" version="1.0.1" name="Telekom Sport" provider-name="asciidisco">
<requires>
<import addon="xbmc.python" version="2.24.0"/>
<import addon="script.module.pydes" version="2.0.1"/>
Expand Down Expand Up @@ -29,7 +29,8 @@
<email>[public] at [asciidisco] dot [com]</email>
<source>https://github.com/asciidisco/plugin.video.telekom-sport</source>
<news>
Initial Release
- Fixes sorting of main menu date folders
- Fixes playability on Kodi 18
</news>
</extension>
</addon>
2 changes: 1 addition & 1 deletion resources/language/English/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Telekom Sport
# Addon id: plugin.video.telekom-sport
# Addon version: 1.0.0
# Addon version: 1.0.1
# Addon Provider: asciidisco
msgid ""
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion resources/language/German/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Telekom Sport
# Addon id: plugin.video.telekom-sport
# Addon version: 1.0.0
# Addon version: 1.0.1
# Addon Provider: asciidisco
msgid ""
msgstr ""
Expand Down

0 comments on commit 1e14c2e

Please sign in to comment.