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 05-11-2013, 06:49 AM   #1
psy65
Enthusiast
psy65 doesn't litterpsy65 doesn't litter
 
Posts: 28
Karma: 110
Join Date: Oct 2011
Device: kobo touch
modifying reading stats (number of books read and hours read)?

Hi

Recently I did a factory reset on my kobo and I lost my reading stats(number of book read and hours read.

I was wondering if there was any way to manually modify those numbers in a configuration file or in the database? I've looked at the database but it doesn't seem to be there so my guess is that these numbers are somewhere else!

Thank you
psy65 is offline   Reply With Quote
Old 05-11-2013, 07:06 AM   #2
davidfor
Wizard
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: 4,804
Karma: 4772844
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
The stats are stored in in the database. They are synced to the server for the purchased kepubs. But, for sideloaded books, they are purely in the database. It is in the Event table. Recreating them manually would be difficult as there are several rows per book that has been opened. And not all of the data is obvious. If you have a backup of the database from before reset, it probably would be possible to extract the data and load it into the new database.
davidfor is online now   Reply With Quote
 
Enthusiast
Old 05-11-2013, 07:47 AM   #3
psy65
Enthusiast
psy65 doesn't litterpsy65 doesn't litter
 
Posts: 28
Karma: 110
Join Date: Oct 2011
Device: kobo touch
Quote:
Originally Posted by davidfor View Post
The stats are stored in in the database. They are synced to the server for the purchased kepubs. But, for sideloaded books, they are purely in the database. It is in the Event table. Recreating them manually would be difficult as there are several rows per book that has been opened. And not all of the data is obvious. If you have a backup of the database from before reset, it probably would be possible to extract the data and load it into the new database.
that's what I'm looking at now. It appears to be in the event table. Event number 46 seems to contain time red per book in minutes in the eventcount column and event number 5 seems to indicate a finished book. I'm pretty sure about the meaning of event 5 but not as much about event 46.

as you say it would probably be possible to transfer those 2 type of records from one database to another but it would not be that easy. then copying the whole table content would probably be easier.

If I find enough time,I might just try it this weekend

anyone ever tried this with success?

thanks
psy65 is offline   Reply With Quote
Old 05-11-2013, 09:04 AM   #4
davidfor
Wizard
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: 4,804
Karma: 4772844
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
I have spent a bit of time trying to work out the events. Below is what I have. Some of the events map to awards (table Achievement) through the Rules table. I have posted this before, but this is probably a good place for it to reside.

Code:
Id		Description
0		Sync with Kobo			- One for each book synced, but only when a new book is downloaded?	LastOccurence is updated
3		Open book
4		Started a digital library	- One for each kepub
5		Finished book
46		Turn page			- Event count = number of pages turned
47		Read all night
48		Read all night
63
80 		Page Turner ("Read two hours straight")
1001	Read 12am-1am
1002	Read 1am-5am
1004	Read 7am-9am
1005	Read 9am-12am
1006	Read 12pm-2pm
1007	Read 2pm-4pm
1008	Read 4pm-6pm
1009	Read 6pm-8pm
1010	Read 8pm-10pm
1011	Read 10pm-12pm
1020	Open book?
1021	Close book?
For events 1, 36, 52 and 79 there seem to be only one row.

There are some inconsistencies. Both events 46 and 80 count page turns, but they don't match. The count for 80 is always less than for 46. It is possible that 46 is counting screens and 80 page numbers. The value for 46 is what is on the stats screen for the current book.

When I have looked at ExtraData, it tends to be made up of a series of timestamps. I suspect that for events like 1020 and 1021, it is a list of the times when the event occurred. The pairs from the two events might be used to calculate the minutes per session and hours read. The only problem with that, is that the counts don't match for the book I am currently reading. I am confident of the meaning of the events, but there seems to be occasions when the close is not recorded.
davidfor is online now   Reply With Quote
Old 05-11-2013, 09:15 AM   #5
davidfor
Wizard
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: 4,804
Karma: 4772844
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by psy65 View Post
as you say it would probably be possible to transfer those 2 type of records from one database to another but it would not be that easy. then copying the whole table content would probably be easier.
If I was doing this, I would copy all the rows for ContentID starting with "file:///mnt". That would get all the events for sideloaded books. Loading that into the new database before starting to read any of the books, should be safe and give you what you want. The rows for books that are synced via the server, should be restored when at a sync.
davidfor is online now   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
Touch How to check your reading stats while you read on epubs Reaper1242 Kobo Reader 3 01-05-2013 04:34 AM
Reading Stats - Books Finished Incorrect DragonflyKing Kobo Reader 0 12-29-2012 11:57 PM
Managing reading queue and read books paulfiera Calibre 5 05-08-2011 06:07 AM
READ 100 BOOKS in 2011! The What Are You Reading Thread. kindlekitten Reading Recommendations 12 01-06-2011 12:24 AM


All times are GMT -4. The time now is 08:17 PM.


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