Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions resources/lib/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/playerinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Loading