View Single Post
Old 05-22-2022, 12:56 PM   #7167
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,509
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by JimmXinu View Post
That's an issue with the new Marking features in Calibre. From #833:
Sorry -- I forgot about this.

I *think* it can happen only if
  1. There are no marked books.
  2. A set of book IDs are marked, where at least one of the IDs is for a deleted or non-existent book.
This sequence avoids the check for deleted books (book_id is None).

Note that if there are other marks then the check is done. The list of marked books must be empty before the problematic book is added.

There are some other errors in my changed code that could cause problems. The biggest is one place where I confused the book_id with the booklist row number. Sigh.

EDIT for explanation: many years ago, V0 .. V2 I think, calibre used the row number in the GUI for the book id, changing the 'real' id into the row number when needed. This changed with Kovid's new database code in V3 (I think), where the real book id became the one-true-ID. However, there is still a pile of legacy code in the GUI that uses the 'old' system. I confused myself when I looked at the API and chose the wrong method. As I said, sigh...

Last edited by chaley; 05-22-2022 at 01:39 PM.
chaley is offline   Reply With Quote