diff --git a/lib/api_tmdb/tmdb_api.py b/lib/api_tmdb/tmdb_api.py index 64516a8d..0355bccd 100644 --- a/lib/api_tmdb/tmdb_api.py +++ b/lib/api_tmdb/tmdb_api.py @@ -360,8 +360,8 @@ class TmdbIndexer(TVInfoBase): characters.append( TVInfoCharacter(name=clean_char_name, ti_show=ti_show, person=[_it_person_obj], episode_count=character.get('episode_count'), - plays_self=clean_char_name and - (clean_char_name or '').lower() in ('self', clean_lower_person_name)) + plays_self=enforce_type(clean_char_name and + (clean_char_name or '').lower() in ('self', clean_lower_person_name), bool, False)), ) _it_person_obj.characters = characters @@ -768,8 +768,8 @@ class TmdbIndexer(TVInfoBase): clean_lower_person_name = (clean_person_name or '').lower() or None character_obj = TVInfoCharacter( name=clean_char_name, - plays_self=clean_char_name and - (clean_char_name or '').lower() in ('self', clean_lower_person_name), + plays_self=enforce_type(clean_char_name and + (clean_char_name or '').lower() in ('self', clean_lower_person_name), bool, False), person=[ TVInfoPerson( p_id=person_obj['id'], name=clean_person_name, diff --git a/lib/api_trakt/indexerapiinterface.py b/lib/api_trakt/indexerapiinterface.py index 0318901c..13b235a8 100644 --- a/lib/api_trakt/indexerapiinterface.py +++ b/lib/api_trakt/indexerapiinterface.py @@ -333,7 +333,8 @@ class TraktIndexer(TVInfoBase): _ti_character = TVInfoCharacter( name=clean_ch, regular=c.get('series_regular'), ti_show=ti_show, person=[result], episode_count=c.get('episode_count'), - plays_self=(clean_ch or '').lower() in ('self', clean_lower_person_name)) + plays_self=enforce_type((clean_ch or '').lower() in + ('self', clean_lower_person_name), bool, False)) pc.append(_ti_character) ti_show.cast[(RoleTypes.ActorGuest, RoleTypes.ActorMain)[ c.get('series_regular', False)]].append(_ti_character) diff --git a/lib/api_tvmaze/tvmaze_api.py b/lib/api_tvmaze/tvmaze_api.py index f019d360..90c6e336 100644 --- a/lib/api_tvmaze/tvmaze_api.py +++ b/lib/api_tvmaze/tvmaze_api.py @@ -443,7 +443,8 @@ class TvMaze(TVInfoBase): sizes={TVInfoImageSize.original: c.character.image['original'], TVInfoImageSize.medium: c.character.image['medium']})] ch.append(TVInfoCharacter(name=self._clean_character_name(c.character.name), - ti_show=ti_show, episode_count=1, plays_self=c.character.plays_self, + ti_show=ti_show, episode_count=1, + plays_self=enforce_type(c.character.plays_self, bool, False), voice=c.character.voice, image= c.character.image and c.character.image.get('original'), thumb_url= c.character.image and c.character.image.get('medium'), @@ -537,7 +538,8 @@ class TvMaze(TVInfoBase): sizes={TVInfoImageSize.original: c.character.image['original'], TVInfoImageSize.medium: c.character.image['medium']})] ch.append(TVInfoCharacter(name=_clean_char_name, ti_show=ti_show, regular=regular, episode_count=1, - person=[_ti_person_obj], plays_self=c.character.plays_self, + person=[_ti_person_obj], + plays_self=enforce_type(c.character.plays_self, bool, False), voice=c.character.voice, image=c.character.image and c.character.image.get('original'), thumb_url=c.character.image and c.character.image.get('medium'), @@ -631,7 +633,8 @@ class TvMaze(TVInfoBase): TVInfoCharacter(image=cur_ch.image and cur_ch.image.get('original'), name=self._clean_character_name(cur_ch.name), ids=TVInfoIDs({TVINFO_TVMAZE: cur_ch.id}), - p_id=cur_ch.id, person=[person], plays_self=cur_ch.plays_self, + p_id=cur_ch.id, person=[person], + plays_self=enforce_type(cur_ch.plays_self, bool, False), thumb_url=cur_ch.image and cur_ch.image.get('medium'), ti_show=_s_o ))