normalize rating/votes

This commit is contained in:
j 2011-11-10 21:12:47 +01:00
parent 84bc58a4c7
commit a6ac57c54f
1 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,12 @@ def getData(request):
if 'summary' in data:
data['summary'] = fix_links(data['summary'])
if 'rating' in data:
data['rating'] = data['rating'] * 10
if 'votes' in data:
data['votes'] = 100 * data['votes'] / 1000000 #should be max votes on imdb
if 'reviews' in data:
reviews = []
for r in data['reviews']: