mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-23 21:35:05 +00:00
fix type of self.plays_self
This commit is contained in:
parent
283a9258d5
commit
165144ca5b
3 changed files with 12 additions and 8 deletions
|
@ -360,8 +360,8 @@ class TmdbIndexer(TVInfoBase):
|
||||||
characters.append(
|
characters.append(
|
||||||
TVInfoCharacter(name=clean_char_name, ti_show=ti_show, person=[_it_person_obj],
|
TVInfoCharacter(name=clean_char_name, ti_show=ti_show, person=[_it_person_obj],
|
||||||
episode_count=character.get('episode_count'),
|
episode_count=character.get('episode_count'),
|
||||||
plays_self=clean_char_name and
|
plays_self=enforce_type(clean_char_name and
|
||||||
(clean_char_name or '').lower() in ('self', clean_lower_person_name))
|
(clean_char_name or '').lower() in ('self', clean_lower_person_name), bool, False)),
|
||||||
)
|
)
|
||||||
|
|
||||||
_it_person_obj.characters = characters
|
_it_person_obj.characters = characters
|
||||||
|
@ -768,8 +768,8 @@ class TmdbIndexer(TVInfoBase):
|
||||||
clean_lower_person_name = (clean_person_name or '').lower() or None
|
clean_lower_person_name = (clean_person_name or '').lower() or None
|
||||||
character_obj = TVInfoCharacter(
|
character_obj = TVInfoCharacter(
|
||||||
name=clean_char_name,
|
name=clean_char_name,
|
||||||
plays_self=clean_char_name and
|
plays_self=enforce_type(clean_char_name and
|
||||||
(clean_char_name or '').lower() in ('self', clean_lower_person_name),
|
(clean_char_name or '').lower() in ('self', clean_lower_person_name), bool, False),
|
||||||
person=[
|
person=[
|
||||||
TVInfoPerson(
|
TVInfoPerson(
|
||||||
p_id=person_obj['id'], name=clean_person_name,
|
p_id=person_obj['id'], name=clean_person_name,
|
||||||
|
|
|
@ -333,7 +333,8 @@ class TraktIndexer(TVInfoBase):
|
||||||
_ti_character = TVInfoCharacter(
|
_ti_character = TVInfoCharacter(
|
||||||
name=clean_ch, regular=c.get('series_regular'), ti_show=ti_show, person=[result],
|
name=clean_ch, regular=c.get('series_regular'), ti_show=ti_show, person=[result],
|
||||||
episode_count=c.get('episode_count'),
|
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)
|
pc.append(_ti_character)
|
||||||
ti_show.cast[(RoleTypes.ActorGuest, RoleTypes.ActorMain)[
|
ti_show.cast[(RoleTypes.ActorGuest, RoleTypes.ActorMain)[
|
||||||
c.get('series_regular', False)]].append(_ti_character)
|
c.get('series_regular', False)]].append(_ti_character)
|
||||||
|
|
|
@ -443,7 +443,8 @@ class TvMaze(TVInfoBase):
|
||||||
sizes={TVInfoImageSize.original: c.character.image['original'],
|
sizes={TVInfoImageSize.original: c.character.image['original'],
|
||||||
TVInfoImageSize.medium: c.character.image['medium']})]
|
TVInfoImageSize.medium: c.character.image['medium']})]
|
||||||
ch.append(TVInfoCharacter(name=self._clean_character_name(c.character.name),
|
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,
|
voice=c.character.voice,
|
||||||
image= c.character.image and c.character.image.get('original'),
|
image= c.character.image and c.character.image.get('original'),
|
||||||
thumb_url= c.character.image and c.character.image.get('medium'),
|
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'],
|
sizes={TVInfoImageSize.original: c.character.image['original'],
|
||||||
TVInfoImageSize.medium: c.character.image['medium']})]
|
TVInfoImageSize.medium: c.character.image['medium']})]
|
||||||
ch.append(TVInfoCharacter(name=_clean_char_name, ti_show=ti_show, regular=regular, episode_count=1,
|
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,
|
voice=c.character.voice,
|
||||||
image=c.character.image and c.character.image.get('original'),
|
image=c.character.image and c.character.image.get('original'),
|
||||||
thumb_url=c.character.image and c.character.image.get('medium'),
|
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'),
|
TVInfoCharacter(image=cur_ch.image and cur_ch.image.get('original'),
|
||||||
name=self._clean_character_name(cur_ch.name),
|
name=self._clean_character_name(cur_ch.name),
|
||||||
ids=TVInfoIDs({TVINFO_TVMAZE: cur_ch.id}),
|
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'),
|
thumb_url=cur_ch.image and cur_ch.image.get('medium'),
|
||||||
ti_show=_s_o
|
ti_show=_s_o
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in a new issue