mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Metadata download: Round the downloaded ratings so that, for example, 3.6 stars becomes 4 stars instead of 3 stars. Fixes #1335696 [Amazon Ratings metadata download only rounds down](https://bugs.launchpad.net/calibre/+bug/1335696)
This commit is contained in:
parent
dd324b1ce5
commit
c47ed6666a
@ -289,7 +289,7 @@ class ISBNMerge(object):
|
||||
if rating and rating > 0 and rating <= 5:
|
||||
ratings.append(rating)
|
||||
if ratings:
|
||||
ans.rating = sum(ratings)/len(ratings)
|
||||
ans.rating = int(round(sum(ratings)/len(ratings)))
|
||||
|
||||
# Smallest language is likely to be valid
|
||||
ans.language = self.length_merge('language', results,
|
||||
|
Loading…
x
Reference in New Issue
Block a user