From 3cf265e461291d42feeca5600529652a1b69c6ad Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 17 Sep 2010 10:39:24 +0200 Subject: [PATCH] import imdb if required --- oxdata/lookup/views.py | 6 +++--- oxdata/poster/models.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/oxdata/lookup/views.py b/oxdata/lookup/views.py index 722a215..07b898f 100644 --- a/oxdata/lookup/views.py +++ b/oxdata/lookup/views.py @@ -14,12 +14,12 @@ def get_movie_id(request): if 'movieId' in request.GET: movieId = request.GET['movieId'] if len(movieId) == 7: - movie_id = models.MovieId.objects.get(imdb_id=movieId) + movie_id = models.getMovieIdByImdbId(imdb_id=movieId) else: movie_id = models.MovieId.objects.get(oxdb_id=movieId) if 'imdb' in request.GET: - imdbId = request.GET['imdb'] - movie_id = models.MovieId.objects.get(imdb_id=imdbId) + movieId = request.GET['imdb'] + movie_id = models.getMovieIdByImdbId(imdb_id=movieId) elif 'oxdb' in request.GET: oxdbId = request.GET['oxdb'] movie_id = models.MovieId.objects.get(oxdb_id=oxdbId) diff --git a/oxdata/poster/models.py b/oxdata/poster/models.py index ddf39d0..904f52c 100644 --- a/oxdata/poster/models.py +++ b/oxdata/poster/models.py @@ -17,6 +17,8 @@ import ox.web.impawards from oxdata.lookup.models import MovieId def getPosters(movie_id, url_prefix='', limit=lambda x, y: x