From a20702c30b5222024fb649480e2056e2213c0d92 Mon Sep 17 00:00:00 2001 From: mediaminister Date: Sun, 25 Jan 2026 17:47:28 +0100 Subject: [PATCH] Fix labels --- resources/lib/api.py | 7 +++++-- resources/lib/playerinfo.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/lib/api.py b/resources/lib/api.py index f642c897..7592f080 100644 --- a/resources/lib/api.py +++ b/resources/lib/api.py @@ -1663,7 +1663,10 @@ def convert_episode(episode_tile, destination=None): # Basic tile properties is_playable = episode_tile.get('available', True) is_live = episode_tile.get('active', False) - program_title = episode_tile.get('subtitle') or '' + program_title = next( + (meta.get('value') for meta in episode_tile.get('primaryMeta', [])), + '' + ) episode_title = episode_tile.get('title') if episode_tile.get('action'): path = url_for('play_url', video_url=episode_tile.get('action', {}).get('link')) @@ -2179,7 +2182,7 @@ def convert_seasons(api_data, program_name): _, _, _, title_item = convert_episode(episode_tile) if len(api_data) > 1: season_title = '[B]{}:[/B] {}'.format(season.get('title'), title_item.label) - elif title_item.info_dict['tvshowtitle'] != title_item.label: + elif title_item.info_dict['tvshowtitle'] and title_item.info_dict['tvshowtitle'] != title_item.label: season_title = '[B]{}:[/B] {}'.format(title_item.info_dict['tvshowtitle'], title_item.label) else: season_title = title_item.label diff --git a/resources/lib/playerinfo.py b/resources/lib/playerinfo.py index fee5f20c..9f4cfce2 100644 --- a/resources/lib/playerinfo.py +++ b/resources/lib/playerinfo.py @@ -72,7 +72,7 @@ def onPlayBackStarted(self): # pylint: disable=invalid-name return # Get resumepoint data - episode_id = 'https://' + self.path.split('https://')[1] + episode_id = '/' + self.path.split('//')[1] resumepoint_data = get_resumepoint_data(episode_id=episode_id) self.video_id = resumepoint_data.get('mediaId') self.resumepoint_title = resumepoint_data.get('mediaName')