From a9850b2ad6be9a5d6bff6447ea426d56bf86f695 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 4 Jan 2011 11:53:59 +0530 Subject: [PATCH] releasedate, genre --- pandora/item/models.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index d5d6274..fd5c999 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -279,7 +279,9 @@ class Item(models.Model): if 'countries' in data: data['country'] = data.pop('countries') 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: data['summary'] = data.pop('plot') if isinstance(data['cast'][0], basestring): @@ -353,7 +355,7 @@ class Item(models.Model): 'year': 'year', 'runtime': 'runtime', - 'release_date': 'release_date', + 'releasedate': 'releasedate', 'country': 'country', 'director': 'director', @@ -362,7 +364,7 @@ class Item(models.Model): 'producer': 'producer', 'cinematographer': 'cinematographer', 'language': 'language', - 'genres': 'genre', + 'genre': 'genre', 'keyword': 'keyword', 'cast': 'cast', 'series_title': 'series_title',