mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-01-05 11:40:20 -05:00
Fix #4022 (Incorrect Rating in Bulk)
This commit is contained in:
parent
d377b0f6e3
commit
2c65a90878
@ -191,7 +191,7 @@ def get_social_metadata(mi, verbose=0):
|
||||
comments.add(dmi.comments)
|
||||
if ratings:
|
||||
rating = sum(ratings)/float(len(ratings))
|
||||
if mi.rating is None:
|
||||
if mi.rating is None or mi.rating == 0:
|
||||
mi.rating = rating
|
||||
else:
|
||||
mi.rating = (mi.rating + rating)/2.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user