person keys should be unique fixes #900

This commit is contained in:
j 2012-07-02 15:06:08 +02:00
parent d6be4b20f7
commit 43e8efc470

View file

@ -400,6 +400,11 @@ class Imdb(SiteParser):
self['episodeDirector'] = self['director']
self['director'] = self['creator']
for key in ('actor', 'writer', 'producer', 'editor'):
if key in self:
self[key] = sorted(list(set(self[key])),
lambda a, b: self[key].index(a) - self[key].index(b))
if 'budget' in self and 'gross' in self:
self['profit'] = self['gross'] - self['budget']