Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old 07-24-2014, 03:02 PM   #946
vlad59
Addict
vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.
 
Posts: 336
Karma: 9319
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Quote:
Originally Posted by micster View Post
My books seem to be rated from 0-10. And yes, they start off as whole numbers and not floats. But then if a book has a rating of five and then it gets divided by 2 in the function getRating () we are left with the float 2.5 which causes a problem.
I know that, I just tried to change the rating of a book with Calibre and Calibre does not allow to use float ratings or maybe I'm missing a setting
vlad59 is offline   Reply With Quote
Old 07-24-2014, 03:18 PM   #947
micster
Enthusiast
micster began at the beginning.
 
Posts: 37
Karma: 10
Join Date: May 2012
Device: none
Quote:
Originally Posted by vlad59 View Post
I know that, I just tried to change the rating of a book with Calibre and Calibre does not allow to use float ratings or maybe I'm missing a setting
You are correct that there are no "Half-Star" ratings in Calibre, I should have been more clear. But what are the values of your book ratings from Calibre?

When I added this code to the getRating () function...
PHP Code:
echo $this->rating 
... I got values returned that were higher than five. They seem to be rated from 0-10 which I assume is why they are being divided by 2 in the getRating () function, correct? And it's this function (and not Calibre) that is creating the floats I believe.

Sorry if I'm not being clear. Perhaps I am missing something also.
micster is offline   Reply With Quote
Old 07-25-2014, 04:04 AM   #948
vlad59
Addict
vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.
 
Posts: 336
Karma: 9319
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
@micster

Thanks for the clarification. I'll fix the code to support half stars. I'll create a testcase with sqlite.
vlad59 is offline   Reply With Quote
Old 07-27-2014, 09:15 AM   #949
vlad59
Addict
vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.
 
Posts: 336
Karma: 9319
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
I got an expected problem with the rating problem micster found .... there is no unicode characters for half filled star ....
vlad59 is offline   Reply With Quote
Old 07-27-2014, 02:21 PM   #950
mariosipad
Groupie
mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'
 
Posts: 165
Karma: 10372
Join Date: Nov 2012
Device: iPad & iPhone with Marvin
Wouldn't ★★★½ (for 3.5 stars) not do the trick?
mariosipad is offline   Reply With Quote
Old 07-27-2014, 03:55 PM   #951
vlad59
Addict
vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.
 
Posts: 336
Karma: 9319
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Quote:
Originally Posted by mariosipad View Post
Wouldn't ★★★½ (for 3.5 stars) not do the trick?
I thought about it but previously I added white stars in the end and I think that's not very pretty :

★★★½☆

I'll think of something else ... or stop add empty stars in the end ... still thinking
vlad59 is offline   Reply With Quote
Reply

Tags
calibre opds

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP+Apache web server for calibre ... chaley Related Tools 254 04-28-2014 08:18 PM
[Old Thread] Android FBreader and Calibre OPDS server question kalex Calibre 4 12-15-2012 01:50 PM
External OPDS catalogue in Calibre bolton Calibre 1 09-05-2012 06:14 AM
Calibre OPDS server with windows apps? nickdma Related Tools 9 02-02-2011 03:09 PM
Calibre Command Line usage with PHP artoros Related Tools 13 07-01-2010 09:57 AM


All times are GMT -4. The time now is 03:08 AM.


MobileRead.com is a privately owned, operated and funded community.