episodeYear
This commit is contained in:
parent
981a0ee2ec
commit
be28a4c625
1 changed files with 14 additions and 5 deletions
|
@ -348,20 +348,29 @@ class Imdb(SiteParser):
|
||||||
if 'episodeTitle' in self and 'season' in self and 'episode' in self:
|
if 'episodeTitle' in self and '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'])
|
||||||
for key in ('Director', 'Year'):
|
if 'director' in self:
|
||||||
if key.lower() in self:
|
self['episodeDirector'] = self['director']
|
||||||
self['episode%s'%key] = self[key.lower()]
|
|
||||||
series = Imdb(self['series'])
|
|
||||||
|
|
||||||
|
series = Imdb(self['series'])
|
||||||
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:
|
||||||
series['creator'] = series['director'][:1]
|
series['creator'] = series['director'][:1]
|
||||||
|
|
||||||
for key in ['creator', 'year', 'country']:
|
for key in ['creator', 'country']:
|
||||||
if key in series:
|
if key in series:
|
||||||
self[key] = series[key]
|
self[key] = series[key]
|
||||||
|
|
||||||
|
if 'year' in series:
|
||||||
|
self['seriesYear'] = series['year']
|
||||||
|
if not 'year' in self:
|
||||||
|
self['year'] = series['year']
|
||||||
|
|
||||||
|
if 'year' in self:
|
||||||
|
self['episodeYear'] = self['year']
|
||||||
|
if 'creator' in self:
|
||||||
|
self['seriesDirector'] = self['creator']
|
||||||
|
|
||||||
if 'originalTitle' in self:
|
if 'originalTitle' in self:
|
||||||
del self['originalTitle']
|
del self['originalTitle']
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue