View Single Post
Old 10-28-2021, 10:21 PM   #2314
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by pricciar View Post
I actually assumed the database was corrupt, but, I didn't see any messages from the plug-in, and I use the automatic db back up. So, I wasn't sure. I do have recent backups to go to.

The behavior is the same whether I eject and reconnect, or restart calibre. One connection will have the one book, the next will be multiple books.

How it usually works is that only the books that I have read since I last plugged in my Kobo show up. What's happening now is that a random list of books shows up when I plug in the one time, and one book will show up the other time.
Oh, also, if I have read any books in the meantime they show up when the one book shows up and have their data properly set in Calibre. But, they disappear in subsequent checks. (So, the data with those books is properly set. you'll notice in the log that Without Fail has been updated, but it's not one of the books that shows up, after the initial update.)

The multiple books are random some I read recently, and some long ago.
Gatecrasher
Case Histories
Before the Fall
Mr. Mercedes: A Novel
Crying in H Mart: A Memoir
Even Greater Mistakes
https://www.dropbox.com/s/w6z3f48uni...libre.jpg?dl=0

The single book is the last book I read before all of this started.
The Last Apothecary
https://www.dropbox.com/s/247y987nzi...libre.jpg?dl=0

date and time on the device and computer are correct and accurate.

I've send the logs by PM. Thank you very much for your help, and the plug in. It's the best!
Looking at the logs, for "Gatecrasher", the bit that is comparing the status on the device to that in the library is:


Code:
DEBUG:    0.1 ----------- _store_bookmarks - top of loop -----------

DEBUG:    0.1 _store_bookmarks - Current book: Gatecrasher - Ben Widdicombe
DEBUG:    0.1 _store_bookmarks - contentIds='['file:///mnt/onboard/Widdicombe, Ben/Gatecrasher - Ben Widdicombe.kepub.epub']'
DEBUG:    0.1 _store_bookmarks - contentId='file:///mnt/onboard/Widdicombe, Ben/Gatecrasher - Ben Widdicombe.kepub.epub'
DEBUG:    0.1 _store_bookmarks - device_status='None'
DEBUG:    0.1 _store_bookmarks - result='{'ChapterIDBookmarked': 'OEBPS/cover.xhtml#kobo.1.1', 'adobe_location': None, 'ReadStatus': 2, '___PercentRead': 100, 'Attribution': 'Ben Widdicombe', 'DateLastRead': '2020-06-20T14:20:06Z', 'Title': 'Gatecrasher', 'MimeType': 'application/x-kobo-epub+zip', 'Rating': None, 'ContentID': 'file:///mnt/onboard/Widdicombe, Ben/Gatecrasher - Ben Widdicombe.kepub.epub'}'
DEBUG:    0.1 _store_bookmarks - device_status is None
DEBUG:    0.1 _store_bookmarks - finished reading database for book - device_status= {'ChapterIDBookmarked': 'OEBPS/cover.xhtml#kobo.1.1', 'adobe_location': None, 'ReadStatus': 2, '___PercentRead': 100, 'Attribution': 'Ben Widdicombe', 'DateLastRead': '2020-06-20T14:20:06Z', 'Title': 'Gatecrasher', 'MimeType': 'application/x-kobo-epub+zip', 'Rating': None, 'ContentID': 'file:///mnt/onboard/Widdicombe, Ben/Gatecrasher - Ben Widdicombe.kepub.epub'}
DEBUG:    0.1 _store_bookmarks - Start of checks for current_last_read - reading_position_changed='False'
DEBUG:    0.1 _store_bookmarks - current_last_read='2020-06-20 14:20:06+00:00'
DEBUG:    0.1 _store_bookmarks - new_last_read    ='2020-06-20 14:20:06+00:00'
DEBUG:    0.1 _store_bookmarks - current_last_read != new_last_read='False'
DEBUG:    0.1 _store_bookmarks - After checking current_last_read - reading_position_changed='False'
DEBUG:    0.1 _store_bookmarks - current_percentRead ='100'
DEBUG:    0.1 _store_bookmarks - new_kobo_percentRead='100'
DEBUG:    0.1 _store_bookmarks - current_percentRead != new_kobo_percentRead='False'
DEBUG:    0.1 _store_bookmarks - After checking percent read - reading_position_changed= False
DEBUG:    0.1 _store_bookmarks - current_chapterid ='OEBPS/Cover.xhtml#kobo.1.1'
DEBUG:    0.1 _store_bookmarks - new_chapterid='OEBPS/cover.xhtml#kobo.1.1'
DEBUG:    0.1 _store_bookmarks - current_chapterid != new_chapterid='True'
DEBUG:    0.1 _store_bookmarks - After checking location - reading_position_changed= True
DEBUG:    0.1 _store_bookmarks - current_rating=None, new_kobo_rating=0
DEBUG:    0.1 _store_bookmarks - current_rating != new_kobo_rating= True
DEBUG:    0.1 _store_bookmarks - current_rating != new_kobo_rating and not (current_rating is None and new_kobo_rating == 0)= False
DEBUG:    0.1 _store_bookmarks - current_rating != new_kobo_rating and new_kobo_rating > 0= False
DEBUG:    0.1 _store_bookmarks - position changed for: Gatecrasher - Ben Widdicombe

DEBUG:    0.1 ----------- _store_bookmarks - top of loop -----------
The important lines are highlighted.

This is the first connect where you get ten books. Apparently the stored chapter id has a capital "C" for the name of the file. But, in the device, it is lower case. So, you are prompted to update the book reading status. Which you do. On the next connect, these match, so you are not prompted to update the reading status. This is the case for all the books in question. The case on the device is consistent for each book ("The Lost Apothecary" has uppercase on the device). It is what is in the library that is not.

The question is what is changing the case of the location in the library. The simplest explanation would be another device that has a different version of the book. If you connected the two devices, you should get the same behaviour for each device. One sets the location to lower case and then the other sets it to upper case. There can be a problem if you have the same book on the device twice. The reading status should come from the one with the latest reading status, but, there could be an issue with that. But, it looks like this is only coming from one book.

Otherwise, I don't know. Do you have something that modifies this column?

You can verify what I am saying by looking at the stored reading location before connecting the device and again after. That should show the changed. You could manually change it to lower case to prove that this solves the issue.

The other thing to do is change the settings for the reading status storing. If you turn on the "Only if more recent" option, it will only prompt to store if the last read timestamp changes to a newer date. And if you turn on the "Not if finished in library", it will not get the reading status for books in the library that have the percent read as 100%. Turning on either of these options would solve this problem.
davidfor is offline