Skip to content

Commit

Permalink
Fix cast in info parsing and revert change in wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Falke-Design committed Dec 31, 2023
1 parent 99f473b commit f528b4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion resources/lib/common/kodi_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def set_video_info_tag(info: Dict[str, str], video_info_tag: xbmc.InfoTagVideo):
# From Kodi v20 ListItem.setInfo is deprecated, we need to use the methods of InfoTagVideo object
# "Cast" and "Tag" keys need to be converted
cast_names = info.pop('Cast', [])
video_info_tag.setCast([xbmc.Actor(name) for name in cast_names if name])
video_info_tag.setCast([xbmc.Actor(name) for name in cast_names])
tag_names = info.pop('Tag', [])
video_info_tag.setTagLine(' / '.join(tag_names))
for key, value in info.items():
Expand Down
3 changes: 3 additions & 0 deletions resources/lib/kodi/infolabels.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ def parse_info(videoid, item, raw_data, common_data):
infos.update(_parse_referenced_infos(item, raw_data))
infos.update(_parse_tags(item))

if infos['Cast']:
infos['Cast'] = [name for name in infos['Cast'] if name]

if videoid.mediatype == common.VideoId.EPISODE:
# 01/12/2022: The 'delivery' info in the episode data are wrong (e.g. wrong resolution)
# as workaround we get the 'delivery' info from tvshow data
Expand Down

0 comments on commit f528b4c

Please sign in to comment.