Merge branch 'main' into dev

This commit is contained in:
JackDandy 2024-02-01 22:33:55 +00:00
commit 316ee49883
35 changed files with 82 additions and 80 deletions

View file

@ -397,10 +397,11 @@ class TvMaze(TVInfoBase):
# type: (...) -> Dict[integer_types, integer_types] # type: (...) -> Dict[integer_types, integer_types]
return {sid: v.seconds_since_epoch for sid, v in iteritems(tvmaze.show_updates().updates)} return {sid: v.seconds_since_epoch for sid, v in iteritems(tvmaze.show_updates().updates)}
def _convert_person(self, tvmaze_person_obj): def _convert_person(self, tvmaze_person_obj, load_credits=True):
# type: (tvmaze.Person) -> TVInfoPerson # type: (tvmaze.Person, bool) -> TVInfoPerson
ch = [] ch = []
_dupes = [] _dupes = []
if load_credits:
for c in tvmaze_person_obj.castcredits or []: for c in tvmaze_person_obj.castcredits or []:
ti_show = TVInfoShow() ti_show = TVInfoShow()
ti_show.seriesname = clean_data(c.show.name) ti_show.seriesname = clean_data(c.show.name)
@ -440,6 +441,7 @@ class TvMaze(TVInfoBase):
url=tvmaze_person_obj.url, ids=TVInfoIDs(ids={TVINFO_TVMAZE: tvmaze_person_obj.id}) url=tvmaze_person_obj.url, ids=TVInfoIDs(ids={TVINFO_TVMAZE: tvmaze_person_obj.id})
) )
if load_credits:
for (c_t, regular) in [(tvmaze_person_obj.castcredits or [], True), for (c_t, regular) in [(tvmaze_person_obj.castcredits or [], True),
(tvmaze_person_obj.guestcastcredits or [], False)]: (tvmaze_person_obj.guestcastcredits or [], False)]:
for c in c_t: # type: tvmaze.CastCredit for c in c_t: # type: tvmaze.CastCredit
@ -553,7 +555,7 @@ class TvMaze(TVInfoBase):
existing_character = next( existing_character = next(
(c for c in _s_o.cast[RoleTypes.ActorMain] if c.id == cur_ch.id), (c for c in _s_o.cast[RoleTypes.ActorMain] if c.id == cur_ch.id),
None) # type: Optional[TVInfoCharacter] None) # type: Optional[TVInfoCharacter]
person = self._convert_person(cur_ch.person) person = self._convert_person(cur_ch.person, load_credits=False)
if existing_character: if existing_character:
existing_person = next((p for p in existing_character.person existing_person = next((p for p in existing_character.person
if person.id == p.ids.get(TVINFO_TVMAZE)), if person.id == p.ids.get(TVINFO_TVMAZE)),

View file

@ -1 +1 @@
2023-09-06 2024-01-11