View Single Post
Old 07-06-2024, 12:24 PM   #29
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,481
Karma: 8025704
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Attached are files driver.py and kobotouch_config.py. These together implement the new option I discussed in the previous post. These files go in calibre/devices/kobo/

I tested it with the following steps:
  • Leave the option unchecked (the default), connecting, and disconnecting. Nothing broke as far as I can tell.
  • Connect, then change database on the device so that the SeriesID for one book in a series is different. Disconnect. My Libra 2 now shows the series twice.
  • Check the "force" option.
  • Connect and disconnect.
  • Looking at the database on the device, the SeriesID for the book changed above was changed back.
  • My Libra 2 now shows the series once.

Please let me know if you try these. If you try them, check the option tooltip and how checking/unchecking behaves. Also (of course) check if it works, changing the SeriesID as desired.

I will submit them to Kovid in a few days unless I hear that I shouldn't.

EDIT: @ownedbycats: these changes do what your SQL query does, albeit somewhat differently for technical reasons.
Attached Files
File Type: zip kobotouch_config.zip (7.3 KB, 473 views)
File Type: zip driver.zip (42.2 KB, 474 views)

Last edited by chaley; 07-06-2024 at 12:45 PM.
chaley is offline   Reply With Quote