View Single Post
Old 03-14-2013, 09:09 PM   #139
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
@ichrispa: That is very interesting analysis, but like PeterT and Terisa, I have to disagree with it.

Firstly, I have to take something back. Or maybe modify it. I said that the device is caching the database and not necessarily rereading it after a connection to USB. I said this because I had a circumstance under which I modified the database and it wasn't shown in the library list. But, I found out why. I had misunderstood a column and hadn't changed it appropriately. Now that I fixed that, the changes are always showing up.

What I see is that if I connect my Glo or Touch to my Windows machine and fiddle with the database on the device, the changes are shown as soon as I disconnect. The "fiddling" could be anything. Adding rows to different tables or deleting them. The most common change is modifying the values in the content table. If I change the series info, the description, the last read date, the reading status, the last chapter read, the ISBN, the published date, the author, the title, the reading percentage or the file size, they are shown when I look at the device without restarting it. The same goes for adding a shelf or putting a book on a shelf. Or changing the stored font size for reading a book. Some of these changes are through the driver, some manually using a SQLite browser. A lot are via another different plugin I'm developing whose whole reason is to make these changes.

On a more sever thing to do, yesterday I removed all books from my Glo while it was connected, and replaced the database with one from another user. The I disconnect. The device opened and worked correctly. I couldn't open books but I could look at the details. Then I connect and added a book the user was having trouble with and again, no problems. Then I removed that database and put my 200 books and database back on. When I disconnected, it all worked perfectly.

I do see problems. And they are related to corrupt databases. But as far as I can tell, it is always my fault. I have calibre open, plus the database open and hit the eject button I have in calibre (a great plugin) and just pull the cable forgetting the database is still open and the device wasn't actually ejected from Windows. These cases are why I think the database might be cached. But I think what is happening is that when the device is disconnected, it tries to read the database. If it can't for some reason, it continues using the in-memory data. I don't know if it is using a memory copy of the database, or the built data structures. In these cases, any changes made while using the device (book reading status changed) are lost when the device is powered down and restarted. Or they don't appear in the database when I connect to the PC and look.

I don't doubt you are seeing what you report. But, it disagrees with my experience and the experiences reported here. But, I also don't know how many of them are using Linux. I know that people are using Windows and Macs with no problems, but I am not as a sure about Linux. I have definitely seen others using Linux with their Kobo device, but I am not as how many also use calibre. I might have go with it over the weekend if I have time. I don't currently have Linux box, but there is an idle laptop that could be changed. I'll see what happens.

And for the record, my Glo was bought in December last year. The Touch a year before. Both have had a factory reset in the last month followed by an upgrade to the firmware 2.4.0. And both had a logout last weekend which put a new database onto them and re-added all the books.
davidfor is offline   Reply With Quote