use title from series entry as series title

This commit is contained in:
j 2012-11-07 00:05:18 +01:00
parent 15e78b8cb1
commit 6eb18c3077

View file

@ -425,8 +425,10 @@ class Imdb(SiteParser):
self['episodeTitle'] = re.sub('Episode \#\d+\.\d+', '', self['episodeTitle']) self['episodeTitle'] = re.sub('Episode \#\d+\.\d+', '', self['episodeTitle'])
if 'series' in self: if 'series' in self:
series = Imdb(self['series'], timeout=timeout)
self['seriesTitle'] = series['title']
if 'episodeTitle' in self: if 'episodeTitle' in self:
self['seriesTitle'] = self['title'] self['seriesTitle'] = series['title']
if 'season' in self and 'episode' in self: if 'season' in self and 'episode' in self:
self['title'] = "%s (S%02dE%02d) %s" % ( self['title'] = "%s (S%02dE%02d) %s" % (
self['seriesTitle'], self['season'], self['episode'], self['episodeTitle']) self['seriesTitle'], self['season'], self['episode'], self['episodeTitle'])
@ -436,7 +438,6 @@ class Imdb(SiteParser):
if 'director' in self: if 'director' in self:
self['episodeDirector'] = self['director'] self['episodeDirector'] = self['director']
series = Imdb(self['series'], timeout=timeout)
if not 'creator' in series and 'director' in series: if not 'creator' in series and 'director' in series:
series['creator'] = series['director'] series['creator'] = series['director']
if len(series['creator']) > 10: if len(series['creator']) > 10: