I'm writing a command-line tool to update online serials on my Kobo using Calibre and the Kobo plugin. From testing I've done using the GUI, the Kobo doesn't seem to recognize that a book file has changed unless I first delete it from the Calibre database and the Kobo, then add the updated file as a new book.
I want to be able to do this same thing by running a plugin from the command line (written as an __init__.py that I then execute with calibredb). However, while there's an API function to remove books from the database
https://manual.calibre-ebook.com/db_...e.remove_books, it's not clear to me how I make it remove books from the device also. Is there a way to do this? Alternately, I could have my code delete books directly from the file system on the Kobo, but how do I go from a book in the Calibre db to the corresponding file on the Kobo's file system? With simple heuristics like matching title I could end up deleting the wrong book.
Is there another way of forcing the Kobo to update a book other than this delete-and-recreate flow?