alternative titles are flipped now
This commit is contained in:
parent
deaa2bb988
commit
78986c671e
1 changed files with 4 additions and 4 deletions
|
@ -358,7 +358,7 @@ class Imdb(SiteParser):
|
||||||
'Japan (English title)'
|
'Japan (English title)'
|
||||||
]
|
]
|
||||||
for t in self.get('alternativeTitles', []):
|
for t in self.get('alternativeTitles', []):
|
||||||
for type in t[1].split('/'):
|
for type in t[0].split('/'):
|
||||||
type = type.strip()
|
type = type.strip()
|
||||||
stop_word = False
|
stop_word = False
|
||||||
for key in stop_words:
|
for key in stop_words:
|
||||||
|
@ -366,7 +366,7 @@ class Imdb(SiteParser):
|
||||||
stop_word = True
|
stop_word = True
|
||||||
break
|
break
|
||||||
if not stop_word and not type in types:
|
if not stop_word and not type in types:
|
||||||
types[type] = t[0]
|
types[type] = t[1]
|
||||||
regexps = [
|
regexps = [
|
||||||
"^.+ \(imdb display title\) \(English title\)$",
|
"^.+ \(imdb display title\) \(English title\)$",
|
||||||
"^USA \(imdb display title\)$",
|
"^USA \(imdb display title\)$",
|
||||||
|
@ -420,11 +420,11 @@ class Imdb(SiteParser):
|
||||||
if 'alternativeTitles' in self:
|
if 'alternativeTitles' in self:
|
||||||
alt = {}
|
alt = {}
|
||||||
for t in self['alternativeTitles']:
|
for t in self['alternativeTitles']:
|
||||||
title = cleanup_title(t[0])
|
title = cleanup_title(t[1])
|
||||||
if title not in (self.get('title'), self.get('internationalTitle')):
|
if title not in (self.get('title'), self.get('internationalTitle')):
|
||||||
if title not in alt:
|
if title not in alt:
|
||||||
alt[title] = []
|
alt[title] = []
|
||||||
for c in t[1].split('/'):
|
for c in t[0].split('/'):
|
||||||
c = c.replace('International', '').split('(')[0].strip()
|
c = c.replace('International', '').split('(')[0].strip()
|
||||||
if c:
|
if c:
|
||||||
alt[title].append(c)
|
alt[title].append(c)
|
||||||
|
|
Loading…
Reference in a new issue