parse series credits, fixes #3174

This commit is contained in:
j 2019-04-07 09:21:12 +02:00
parent 356787b37f
commit 47347843d0

View file

@ -559,6 +559,17 @@ class Imdb(SiteParser):
if not self['credits']:
del self['credits']
if 'credits' in self:
for key, deparment in (
('director', 'Series Directed'),
('writer', 'Series Writing Credits'),
('cinematographer', 'Series Cinematography'),
):
if key not in self:
series_credit = [c for c in self['credits'] if c.get('deparment') == deparment]
if series_credit:
self[key] = [c['name'] for c in series_credit]
class ImdbCombined(Imdb):
def __init__(self, id, timeout=-1):
_regex = {}