Skip to content

Commit

Permalink
Merge pull request #13 from thomas-ernest/bugfix/v1.1.10_display_agai…
Browse files Browse the repository at this point in the history
…n_favorites_last_viewed

Bugfix to display favorites and last vieweds following id change in Arte
  • Loading branch information
thomas-ernest authored May 28, 2023
2 parents 0a40cc9 + 29c701d commit f968dd1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Changelog also available in file ./addon.xml xpath /addon/extension/news following Kodi guidelines https://kodi.wiki/view/Add-on_structure#changelog.txt

v1.1.10 (2023-5-28)
- Bugfix to display favorites and last vieweds following id change in Arte

v1.1.9 (2023-4-18)
- Improve security and performance by caching token to limit authentication requests
- Fallback on clip, when stream is not available anymore. Same feature as on Arte mobile. For favorite content.
Expand Down
4 changes: 2 additions & 2 deletions addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def play_live(stream_url):
@plugin.route('/play/<kind>/<program_id>/<audio_slot>', name='play_specific')
def play(kind, program_id, audio_slot='1'):
"""Play content identified with program_id.
kind is a value of TODO (e.g. TRAILER, COLLECTION, LINK, ...)
audio_slot is a numeric
:param str kind: an enum in TODO (e.g. TRAILER, COLLECTION, LINK, CLIP, ...)
:param str audio_slot: a numeric to identify the audio stream to use e.g. 1 2
"""
synched_player = Player(plugin, settings, program_id)
item = view.build_stream_url(plugin, kind, program_id, int(audio_slot), settings)
Expand Down
2 changes: 1 addition & 1 deletion 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.arteplussept" name="Arte +7" version="1.1.9" provider-name="bmf, thomas-ernest">
<addon id="plugin.video.arteplussept" name="Arte +7" version="1.1.10" provider-name="bmf, thomas-ernest">
<!-- https://kodi.wiki/view/Addon.xml -->
<requires>
<import addon="xbmc.python" version="3.0.0"/>
Expand Down
4 changes: 2 additions & 2 deletions resources/lib/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Arte hbbtv - deprecated API since 2022 prefer Arte TV API
_HBBTV_URL = 'http://www.arte.tv/hbbtvv2/services/web/index.php'
_HBBTV_HEADERS = {
'user-agent': 'plugin.video.arteplussept/1.1.9'
'user-agent': 'plugin.video.arteplussept/1.1.10'
}
_HBBTV_ENDPOINTS = {
'category': '/EMAC/teasers/category/v2/{category_code}/{lang}',
Expand Down Expand Up @@ -60,7 +60,7 @@
'login': '/login',
}
ARTETV_HEADERS = {
'user-agent': 'plugin.video.arteplussept/1.1.9',
'user-agent': 'plugin.video.arteplussept/1.1.10',
# required to use token endpoint
'authorization': 'I6k2z58YGO08P1X0E8A7VBOjDxr8Lecg',
# required for Arte TV API. values like web, app, tv, orange, free
Expand Down
6 changes: 3 additions & 3 deletions resources/lib/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def map_artetv_video(item):
progress = item.get('lastviewed') and item.get('lastviewed').get('progress') or 0
time_offset = item.get('lastviewed') and item.get('lastviewed').get('timecode') or 0

if not isinstance(kind, str):
if not isinstance(kind, str) and kind is not None:
kind = kind.get('code')
if kind == 'EXTERNAL':
return None
Expand Down Expand Up @@ -319,9 +319,9 @@ def map_zone_to_item(zone, cached_categories):
Populate cached_categories for zones with videos available in child 'content'"""
menu_item = None
title = zone.get('title')
if zone.get('id') == '9fc57105-847b-49c5-9b4a-f46863754059':
if zone.get('id') == 'b1dfd8e0-4757-4236-9dab-6f6331cb5ea4':
menu_item = create_favorites_item(title)
elif zone.get('id') == '67cea6f3-7af0-4ffa-a6c2-59b1da0ecd4b':
elif zone.get('id') == '823d6af6-fedd-4b54-8049-ddb7158eee64':
menu_item = create_last_viewed_item(title)
elif zone.get('content') and zone.get('content').get('data'):
cached_category = map_cached_categories(zone)
Expand Down

0 comments on commit f968dd1

Please sign in to comment.