mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-28 00:44:21 +02:00
Fix importing ratings from HTML metadata
The HTML import was assuming ratings were out of 5 but the internal representation is out of 10
This commit is contained in:
parent
d36a23d795
commit
8cbaa3a9e2
1 changed files with 1 additions and 3 deletions
|
|
@ -226,9 +226,7 @@ def get(field):
|
|||
mi.rating = float(rating)
|
||||
if mi.rating < 0:
|
||||
mi.rating = 0
|
||||
if mi.rating > 5:
|
||||
mi.rating /= 2.
|
||||
if mi.rating > 5:
|
||||
if mi.rating > 10:
|
||||
mi.rating = 0
|
||||
except:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue