From 0af94f28322c5d5c9ccf9b262fd2946df218e309 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 8 Mar 2012 13:56:52 +0100 Subject: [PATCH] get max votes from imdb --- oxdata/movie/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oxdata/movie/views.py b/oxdata/movie/views.py index 7e37d53..410bc59 100644 --- a/oxdata/movie/views.py +++ b/oxdata/movie/views.py @@ -70,7 +70,8 @@ def getData(request): data['rating'] = float(data['rating']) * 10 if 'votes' in data: - data['votes'] = 100 * float(data['votes']) / 1000000 #should be max votes on imdb + max_votes = ox.data.maxVotes() + data['votes'] = 100 * float(data['votes']) / max_votes if 'reviews' in data: reviews = []