From 8b45dd8460b352347fdd1699c6095761ee5d2285 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 23 Feb 2011 10:51:27 +0100 Subject: [PATCH] cleanup poster api --- oxdata/lookup/views.py | 6 +++++- oxdata/settings.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/oxdata/lookup/views.py b/oxdata/lookup/views.py index ce1bfbd..2ab2eb7 100644 --- a/oxdata/lookup/views.py +++ b/oxdata/lookup/views.py @@ -11,8 +11,12 @@ import models def get_movie_id(request): movie_id = None - if 'itemId' in request.GET: + movieId = None + if 'id' in request.GET: + movieId = request.GET['id'] + elif 'itemId' in request.GET: movieId = request.GET['itemId'] + if movieId: if len(movieId) == 7: movie_id = models.getMovieIdByImdbId(imdb_id=movieId) else: diff --git a/oxdata/settings.py b/oxdata/settings.py index 025fe09..f033f94 100644 --- a/oxdata/settings.py +++ b/oxdata/settings.py @@ -91,6 +91,7 @@ INSTALLED_APPS = ( 'oxdata.lookup', 'oxdata.poster', + 'oxdata.cover', ) LOGIN_REDIRECT_URL='/'