Content server does not correctly display multiple fields of type 'rating'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When more than one field of type "rating" is present in the database, the content server does not accurately display the rating.
In my example, I have two fields of that type. One is the built-in "Rating" field, the other is a custom field of type "ratings, shown with stars", which I called "PMA Rating".
Although these two fields work properly within the main calibre program, the content server doubles the values of each field in its details display.
Also, interestingly, if either field is supposed to be 3 stars or more, all 5 graphic stars will be filled in, but the "hover text" over those stars will show the duplicate (6, 8, or 10 stars for what is supposed to be 3, 4, or 5).
So, for example, if Book X has a rating of 4 stars in the main "Rating" field, and a rating of 2 stars in the additional custom field called, for example, "PMA Rating", it will show the two different ratings in the two different columns accurately within the Calibre program--but on the web site (content server), it will show "Rating: *****" (with the hovertext showing "Rating: 8.0 stars") and "PMA Rating: ****" (with the hovertext showing "PMA Rating: 4.0 stars").
I will attach two screenshots of a single book to demonstrate the two hovertexts. Keep in mind that in the database, the book has a value of 4 stars for the "Rating" field, and 2 stars for the "PMA Rating" field.
Related branches
- Kovid Goyal: Pending requested
-
Diff: 17 lines (+5/-2)1 file modifiedsrc/calibre/library/caches.py (+5/-2)
Here is the second screenshot (illustrating the second hovertext).