minor fixes for new _api
This commit is contained in:
parent
e267ba48df
commit
5399c467c3
1 changed files with 4 additions and 4 deletions
|
@ -12,16 +12,16 @@ from ox.utils import json
|
|||
|
||||
from api.actions import actions
|
||||
from poster.models import getPosters
|
||||
from lookup.models import get_movie_idByImdbId
|
||||
from lookup.models import get_movie_id
|
||||
import models
|
||||
|
||||
|
||||
def posters(request, imdbId):
|
||||
movie_id = get_movie_idByImdbId(imdb_id=imdbId)
|
||||
movie_id = get_movie_id(imdb_id=imdbId)
|
||||
return getPosters(movie_id, request.build_absolute_uri('/'))
|
||||
|
||||
def links(request, imdbId):
|
||||
movie_id = get_movie_idByImdbId(imdb_id=imdbId)
|
||||
movie_id = get_movie_id(imdb_id=imdbId)
|
||||
links = []
|
||||
if movie_id:
|
||||
links = movie_id.links()
|
||||
|
@ -71,7 +71,7 @@ def getData(request):
|
|||
data['rating'] = float(data['rating']) * 10
|
||||
|
||||
if 'votes' in data:
|
||||
max_votes = ox.web.imdb.maxVotes()
|
||||
max_votes = ox.web.imdb.max_votes()
|
||||
data['votes'] = 100 * float(data['votes']) / max_votes
|
||||
|
||||
if 'reviews' in data:
|
||||
|
|
Loading…
Reference in a new issue