use imdb display title before other titles, dont add internationalTitle if its the same as title

This commit is contained in:
j 2012-09-22 22:44:08 +02:00
parent d29f9e3dc8
commit b5b480e3f2

View file

@ -299,6 +299,8 @@ class Imdb(SiteParser):
"^.+ \(.+\) \(English title\)$", "^.+ \(.+\) \(English title\)$",
"^USA$", "^USA$",
"^UK$", "^UK$",
"^USA \(imdb display title\)$",
"^UK \(imdb display title\)$",
"^USA \(.+\)$", "^USA \(.+\)$",
"^UK \(.+\)$", "^UK \(.+\)$",
"^Australia \(.+\)$", "^Australia \(.+\)$",
@ -321,6 +323,11 @@ class Imdb(SiteParser):
for t in ('title', 'internationalTitle'): for t in ('title', 'internationalTitle'):
if t in self: if t in self:
self[t] = cleanup_title(self[t]) self[t] = cleanup_title(self[t])
if 'internationalTitle' in self and \
self.get('title') == self['internationalTitle']:
del self['internationalTitle']
if 'alternativeTitles' in self: if 'alternativeTitles' in self:
alt = {} alt = {}
for t in self['alternativeTitles']: for t in self['alternativeTitles']: