It's very easy if you just modify the calibre source code instead of trying to do it via a plugin. All you have to do is modify the view_format_by_id() method in actions/view.py add a call to db.embed_metadata() to update the metadata in the book format.
|