fix alternative titles
This commit is contained in:
parent
d1e678186b
commit
e216e4a627
1 changed files with 6 additions and 5 deletions
|
@ -243,10 +243,6 @@ class Imdb(SiteParser):
|
||||||
super(Imdb, self).__init__(0)
|
super(Imdb, self).__init__(0)
|
||||||
|
|
||||||
#only list one country per alternative title
|
#only list one country per alternative title
|
||||||
if 'alternative_titles' in self:
|
|
||||||
self['alternative_titles'] = [[t[0],
|
|
||||||
t[1].split(' / ')[0].split('(')[0].strip()]
|
|
||||||
for t in self['alternative_titles']]
|
|
||||||
|
|
||||||
def is_international_title(t):
|
def is_international_title(t):
|
||||||
if 'working title' in t[1].lower(): return False
|
if 'working title' in t[1].lower(): return False
|
||||||
|
@ -263,6 +259,11 @@ class Imdb(SiteParser):
|
||||||
if 'title' in self and self['title'].startswith('"') and self['title'].endswith('"'):
|
if 'title' in self and self['title'].startswith('"') and self['title'].endswith('"'):
|
||||||
self['title'] = self['title'][1:-1]
|
self['title'] = self['title'][1:-1]
|
||||||
|
|
||||||
|
if 'alternative_titles' in self:
|
||||||
|
self['alternative_titles'] = [[t[0],
|
||||||
|
t[1].split(' / ')[0].split('(')[0].strip()]
|
||||||
|
for t in self['alternative_titles']]
|
||||||
|
|
||||||
if 'runtime' in self and self['runtime']:
|
if 'runtime' in self and self['runtime']:
|
||||||
if 'min' in self['runtime']: base=60
|
if 'min' in self['runtime']: base=60
|
||||||
else: base=1
|
else: base=1
|
||||||
|
@ -288,7 +289,7 @@ class Imdb(SiteParser):
|
||||||
if 'series' in self:
|
if 'series' in self:
|
||||||
if 'episode_title' in self:
|
if 'episode_title' in self:
|
||||||
self['series_title'] = self['title']
|
self['series_title'] = self['title']
|
||||||
self['title'] = "%s: %s" % (self['series_title'], self['episode_title'])
|
self['title'] = "%s (S01) %s" % (self['series_title'], self['episode_title'])
|
||||||
if 'episode_title' in self and 'season' in self and 'episode' in self:
|
if 'episode_title' 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['series_title'], self['season'], self['episode'], self['episode_title'])
|
self['series_title'], self['season'], self['episode'], self['episode_title'])
|
||||||
|
|
Loading…
Reference in a new issue