mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -226,9 +226,7 @@ def get_metadata_(src, encoding=None):
|
|||||||
mi.rating = float(rating)
|
mi.rating = float(rating)
|
||||||
if mi.rating < 0:
|
if mi.rating < 0:
|
||||||
mi.rating = 0
|
mi.rating = 0
|
||||||
if mi.rating > 5:
|
if mi.rating > 10:
|
||||||
mi.rating /= 2.
|
|
||||||
if mi.rating > 5:
|
|
||||||
mi.rating = 0
|
mi.rating = 0
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user