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.