normalize rating/votes
This commit is contained in:
parent
84bc58a4c7
commit
a6ac57c54f
1 changed files with 6 additions and 0 deletions
|
@ -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']:
|
||||
|
|
Loading…
Reference in a new issue