I think you want to write the metadata from the calibre library to the actual ebook. There are two ways I can think of to do this.
As you are using ePubs, get the Modify ePub plugin. This has an option to do this. This they way I usually do this.
The other way is via a conversion. calibre will update the metadata when you do a conversion. As you are doing a cleanup of the books, starting with a epub-to-epub conversion could be a good idea.
|