Quantcast
Channel: MobileRead Forums - Kobo Reader
Viewing all articles
Browse latest Browse all 11216

File size info on book details page

$
0
0
I have had the occasional problem with kepub books downloaded from Kobo displaying the wrong file size in the library listing and/or on the book's details page. I haven't seen anyone else posting about this problem, but I thought I'd describe what I have learned in case it will be useful.

The file size is displayed in two places: in the book's library listing (alongside the reading status and file type), and on the book's details page (accessed by a long press on the library listing, or the menu to the right of the book's listing). It is also used to calculate how much space will be saved when archiving books.

The file size is stored in the book's ___FileSize field of the content table in the database. There seem to be two options:

If ___FileSize=0 then the the file size is not displayed at all on the details page, but the correct size is still displayed in the library listing. I think in this case it must be read directly from the filesystem, unless it is stored somewhere else in the database I don't know about.

If ___FileSize>0 then that value (in bytes) is displayed in both the library listing and on the details page, even if it is incorrect. It is also used to calculate how much space is saved by archiving the book, even if incorrect.

So the ideal situation would be to always sfore the correct size in ___FileSize. The second best alternative would be to store zero in ___FileSize. Having the wrong nonzero value in ___FileSize is always a bad thing.

However I have found that while all the file sizes for sideloaded books are correct, some of the books I download directly from Kobo have the incorrect file size set. I thought at first this was a firmware bug because it seemed to start hapenning after upgrading to firmware 2.4.0, but it doesn't happen for every book, so it could be that the file size is loaded from an incorrect value stored on the Kobo server. It also seems to happen only when I buy a book that is already "known" to my device, either by way of a recommendation, or because the books is on my wishlist, so it could be that the size of the recommendation is being displayed instead of the size of the whole book. However it doesn't always happen even in those cases.

I've also noticed that while all sideloaded books have the correct value set in ___FileSize, (and so display the correct file size in both locations) many books downloaded from Kobo set ___FileSIze to zero, and so do not display the file size at all on the book's details page.

What I have been doing to fix the problem is manually setting ___FileSize to the correct value, with a command (this is for the book "The Sky Road" by Ken Macleod, Tor edition) like:
Code:

UPDATE content SET ___FileSize=472414 WHERE BookID IS NULL AND IsDownloaded='true' AND Title='The Sky Road';
I'd be interested to hear if anyone else has come across this problem. An easy way to check could be to sort your library in file size order and look at the books with the smallest filesize (when the size is incorrect is always seems to be far too small rather than too large). Look for any book that seems suspiciously small (if the file size says 1KB or 2KB then it is probably wrong).

Viewing all articles
Browse latest Browse all 11216

Trending Articles