Skip to content

Commit

Permalink
fix(list): Fixes failure with plugin stopping when malformed list ent…
Browse files Browse the repository at this point in the history
…ries occur
  • Loading branch information
asciidisco committed Aug 17, 2017
1 parent 2974513 commit 1493e24
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
16 changes: 8 additions & 8 deletions addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,13 @@ def get_epg(_session, _for):
for slot in slots:
events = slot.get('events')
for event in events:
page_tree.get(element_date).append({
'hash': generateHash(event.get('target_url')),
'url': base_url + event.get('target_url'),
'title': event.get('metadata').get('details').get('home').get('name_full') + ' - ' + event.get('metadata').get('details').get('away').get('name_full') + ' (' + datetime.fromtimestamp(float(event.get('metadata').get('scheduled_start').get('utc_timestamp'))).strftime('%H:%M') + ' Uhr)',
'shorts': (event.get('metadata').get('details').get('home').get('name_mini'), event.get('metadata').get('details').get('away').get('name_mini')),
})
if event.get('metadata', {}).get('details', {}).get('home') is not None:
page_tree.get(element_date).append({
'hash': generateHash(event.get('target_url')),
'url': base_url + event.get('target_url'),
'title': event.get('metadata').get('details').get('home').get('name_full') + ' - ' + event.get('metadata').get('details').get('away').get('name_full') + ' (' + datetime.fromtimestamp(float(event.get('metadata').get('scheduled_start').get('utc_timestamp'))).strftime('%H:%M') + ' Uhr)',
'shorts': (event.get('metadata').get('details').get('home').get('name_mini'), event.get('metadata').get('details').get('away').get('name_mini')),
})
else:
element_date = date.fromtimestamp(float(element.get('metadata').get('scheduled_start').get('utc_timestamp'))).strftime('%d.%m.%Y')
if page_tree.get(element_date) is None:
Expand Down Expand Up @@ -416,7 +417,6 @@ def play(_session, name, game_hash, game_date, _for, use_inputstream):
streams = get_stream_urls(_session, item.get('url'))
for stream in streams:
if stream == name:
log(streams.get(stream))
play_item = xbmcgui.ListItem(path=get_m3u_url(_session, streams.get(stream)))
if use_inputstream is True:
play_item.setProperty('inputstream.adaptive.manifest_type', 'hls')
Expand Down Expand Up @@ -481,7 +481,7 @@ def router(paramstring, _session, user, password, use_inputstream):
log('Inputstream Version: ' + str(inputstream_version))
# determine if we can use inputstream for HLS
use_inputstream = False
if kodi_version >= 18 and inputstream_version >= 207:
if kodi_version >= 17 and inputstream_version >= 207:
use_inputstream = True
# setup in memory cache for epg data
setup_memcache()
Expand Down
9 changes: 5 additions & 4 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.4" name="Telekom Sport" provider-name="asciidisco">
<addon id="plugin.video.telekom-sport" version="1.0.5" 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 @@ -28,8 +28,9 @@
<website>https://www.telekomsport.de/</website>
<email>[public] at [asciidisco] dot [com]</email>
<source>https://github.com/asciidisco/plugin.video.telekom-sport</source>
<news>
- Adds abbility to play the streams via inputstream.adaptive if version is 2.0.7 or higher &amp; Kodi version is 18 or higher
</news>
<news>v1.0.5 (2017-08-17)
- Fixes issues with non standard game maps
- Enables inputstream usage for Kodi 17
</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.4
# Addon version: 1.0.5
# 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.4
# Addon version: 1.0.5
# Addon Provider: asciidisco
msgid ""
msgstr ""
Expand Down

0 comments on commit 1493e24

Please sign in to comment.