Quote:
Originally Posted by 344a
I got a question on the "Update metadata in device library" plugin.
After I add some books to the sd card A in my device, I need to disconnect the device (I believe to flush the device database), and then connect the device again. Then the plugin can work.
Is it possbile no need to disconnect the device first?
|
Sorry, but my immediate reaction is: Don't you think I would have thought of that before?
Yes, I know it's rude of me, but that was reaction.
The problem is the Kobo software works from a database. The database contains the details of all the books the device knows about. Something has to get that info into the database. That happens when you unplug the device and it processes the books. The update metadata updates the database. It can't do that until the database has been populated. Hence send the books to device, disconnect and let the device process the books and on the reconnect, calibre will see them properly.
Of course, the answer to the above is to create the database entries when sending the book rather than letting the device do it. Yes, that is possible, but impractical. And it isn't safe. I don't know exactly what goes into the database. I have reverse engineered chunks, but there are bits I don't know. And it changes with most firmware. The advantage of doing this is not justified by the work or the risk.
But, why would do you need to run update metadata just after sending the books to the device? You should only need this if the metadata in the calibre library has changed from what is on the device. Calibre updates the metadata in the book when it is sent to the device. That means when the books are processed, the latest metadata is put into the database. The only bit this can't handle is the series info. And the driver can do that update when you connect.