normalize alternative title country names

This commit is contained in:
j 2013-07-16 11:41:16 +02:00
parent 07e1a36ba9
commit 02afccc253

View file

@ -443,7 +443,8 @@ class Imdb(SiteParser):
self['alternativeTitles'] = []
for t in sorted(alt, lambda a, b: cmp(sorted(alt[a]), sorted(alt[b]))):
if alt[t]:
self['alternativeTitles'].append((t, sorted(alt[t])))
countries = sorted([normalize_country_name(c) or c for c in alt[t]])
self['alternativeTitles'].append((t, countries))
if not self['alternativeTitles']:
del self['alternativeTitles']