releasedate, genre

This commit is contained in:
j 2011-01-04 11:53:59 +05:30
parent 63d9415298
commit a9850b2ad6

View file

@ -279,7 +279,9 @@ class Item(models.Model):
if 'countries' in data: if 'countries' in data:
data['country'] = data.pop('countries') data['country'] = data.pop('countries')
if 'release date' in data: if 'release date' in data:
data['releasedate'] = min(data.pop('release date')) data['releasedate'] = data.pop('release date')
if isinstance(data['releasedate'], list):
data['releasedate'] = min(data['releasedate'])
if 'plot' in data: if 'plot' in data:
data['summary'] = data.pop('plot') data['summary'] = data.pop('plot')
if isinstance(data['cast'][0], basestring): if isinstance(data['cast'][0], basestring):
@ -353,7 +355,7 @@ class Item(models.Model):
'year': 'year', 'year': 'year',
'runtime': 'runtime', 'runtime': 'runtime',
'release_date': 'release_date', 'releasedate': 'releasedate',
'country': 'country', 'country': 'country',
'director': 'director', 'director': 'director',
@ -362,7 +364,7 @@ class Item(models.Model):
'producer': 'producer', 'producer': 'producer',
'cinematographer': 'cinematographer', 'cinematographer': 'cinematographer',
'language': 'language', 'language': 'language',
'genres': 'genre', 'genre': 'genre',
'keyword': 'keyword', 'keyword': 'keyword',
'cast': 'cast', 'cast': 'cast',
'series_title': 'series_title', 'series_title': 'series_title',