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

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-27-2015, 04:22 AM   #1
Skyfall
Junior Member
Skyfall began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2015
Device: Kobo Aura
KoboReader.Sqlite help (stats lost)

Hi,this is my first message and i hope it's the right place to ask.
Yesterday i lost my reading life stats (hours and books read). I had 233 hours and 22 books and now i have 134 hours and 10.
I know that this info are kept in the file KoboReader.Sqlite
I tried to open the file,looking for the parameter that have these settings but i didn't find them.

So i was asking
1) Does Anyone can upload for me his KoboReader.sqlite file if has similiar stats with mine ? (233 hours and 22 books)
2) Is there a way to edit the file ? I don't want to "cheat",just restore my real stats.

Thanks Sorry for my bad english.
Skyfall is offline   Reply With Quote
Old 03-27-2015, 06:21 AM   #2
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: 6,680
Karma: 6619515
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O
Sorry, neither of those is practical. The KoboReader.sqlite file is a database. It contains the details of all the books on your device and is used for all the functions that show details of the book on the device. So, if I gave you a copy of my database, it would have the details of all my books in it. When you replaced yours, the device would see that the books on the device didn't match those in the database and process all of your books. This would include removing the details of my books.

After this, the reading status, bookmarks and the collections your books were in would be lost. And you would still have my collections, just with no books in them. To me, these things are a lot more important than the stats.

I'm not sure what the state the stats would be in. The stats are stored in a table in the database called "Events". Well, it actually stores events that happen, but this includes an event for each time you finish a book. And one of the events records the time spent reading a book. When my books are deleted from the database, some of the events are removed. I haven't looked at this enough to know whether the events needed for the stats are left in the database or not.

The second option is to create the stats. This would be done by creating events in the Events table. That is easy. Or it would be if I know how to create the data needed. I know which event records finishing a book, EventType=5. But, I don't know how to create all the data in it. There are two columns, in the table that I don't know how to populate. And I have tried a couple of things, and it didn't work.

There has been some discussion on this over the last couple of years. So far, I haven't heard of anyone having any luck with doing this.
davidfor is online now   Reply With Quote
 
Advertisement
Old 03-27-2015, 06:55 AM   #3
Skyfall
Junior Member
Skyfall began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2015
Device: Kobo Aura
Thanks a lot for the exhaustive answer. So,basically,if i understand right,there is not a easy and practical solution to put this reading hours and books back in the sqlite.
Well,thanks again anyway. Next time i'll do more frequent backups of this .sqlite . Lesson learned
Skyfall is offline   Reply With Quote
Old 03-27-2015, 07:06 AM   #4
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: 6,680
Karma: 6619515
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O
Quote:
Originally Posted by Skyfall View Post
Thanks a lot for the exhaustive answer. So,basically,if i understand right,there is not a easy and practical solution to put this reading hours and books back in the sqlite.
Yes.
Quote:
Well,thanks again anyway. Next time i'll do more frequent backups of this .sqlite . Lesson learned
If you are a calibre user, get my Kobo Utilities plugin and you can automate the backup.
davidfor is online now   Reply With Quote
Old Yesterday, 10:25 AM   #5
Skyfall
Junior Member
Skyfall began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2015
Device: Kobo Aura
Sorry,another question regardin the damn .sqlite

I found a previous backup (134 hours and 10 books). I put it into my kobo and they are displayed right. Problem is that as i put the file in the Kobo,i loose the books in my library... Any hint ? I know that if i delete the .sqlite and make a factory reset it works smooth ,but i want to use my backup,not a new db with 0 hours and 0 books
Skyfall is offline   Reply With Quote
Old Yesterday, 11:54 AM   #6
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,588
Karma: 5000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
If you can live with 0 hours and N books, you can open each "finished" book, go to the last page and then page forward, this will close the book and mark it as finished in the stats. (You can mark the book as finished with a long press in the library, or with the calibre plugin, but at least in some firmware versions this does not affect the stats.) It may be possible to artificially increase the hours by leaving a book open for a few days (turn off auto-shutdown) and then closing it.

Last edited by Jellby; Today at 08:41 AM.
Jellby is offline   Reply With Quote
Old Today, 05:21 AM   #7
Skyfall
Junior Member
Skyfall began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2015
Device: Kobo Aura
Thanks Jellby. Your "trick" of put books as read worked and this is a step forward. But leaving a book open with shutdown off didn't work and this is curious: maybe you have to manually flip the page during the day and this would be impossible. I'll give it another try today. Thanks again for support
Skyfall is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo koboreader.sqlite File LaLaLia Kobo Reader 3 10-05-2014 08:05 PM
Sqlite on Kobo Lucas Malor Kobo Developer's Corner 6 03-26-2014 08:06 AM
Compile Plugin and koboreader vlad59 Kobo Developer's Corner 9 01-03-2013 11:25 AM
SQLite Meeky Kindle Developer's Corner 2 01-01-2013 11:02 AM
Koboreader.sqlite gundged maxwelledison Kobo Reader 21 01-12-2011 08:24 AM


All times are GMT -4. The time now is 09:28 PM.


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