diff --git a/resources/lib/common/kodi_wrappers.py b/resources/lib/common/kodi_wrappers.py index dc2af6d4b..c097301cc 100644 --- a/resources/lib/common/kodi_wrappers.py +++ b/resources/lib/common/kodi_wrappers.py @@ -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(): diff --git a/resources/lib/kodi/infolabels.py b/resources/lib/kodi/infolabels.py index d207d466c..baca12fd3 100644 --- a/resources/lib/kodi/infolabels.py +++ b/resources/lib/kodi/infolabels.py @@ -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