if add and update cast that has no character name

This commit is contained in:
Prinz23 2024-10-07 04:00:06 +02:00
parent 29047e44d3
commit 1b08ec8c67

View file

@ -2787,9 +2787,9 @@ class TVShow(TVShowBase):
""" """
cast_list = self.cast_list cast_list = self.cast_list
existing_cast = set(hash(*([', '.join(p.name for p in c.person or [] if p.name)])) existing_cast = set(hash(*([', '.join(p.name for p in c.person or [] if p.name)]))
for c in cast_list or [] if c.name) for c in cast_list or [])
new_cast = set(hash(*([', '.join(p.name for p in c.person or [] if p.name)])) new_cast = set(hash(*([', '.join(p.name for p in c.person or [] if p.name)]))
for c_t, c_l in iteritems(show_info_cast or {}) for c in c_l or [] if c.name for c_t, c_l in iteritems(show_info_cast or {}) for c in c_l or []
and c_t in (RoleTypes.ActorMain, RoleTypes.Host, RoleTypes.Interviewer, RoleTypes.Presenter)) and c_t in (RoleTypes.ActorMain, RoleTypes.Host, RoleTypes.Interviewer, RoleTypes.Presenter))
now = datetime.date.today().toordinal() now = datetime.date.today().toordinal()
max_age = random.randint(30, 60) max_age = random.randint(30, 60)