The problem with doing this via a calibre plugin is the way in which metadata writing is handled in calibre. The ASIN (EXTH record type 113) is not one that calibre maintains. So while it's certainly possible to write a plugin that inserts the correct metadata... anytime that you do a "Convert", "Save to disk" or "Send to device" procedure, calibre will replace the ebook's metadata with its own that's saved in its db... effectively nullifying those changes.
While it's possible to configure calibre to NOT modify the metadata when saving/sending/converting, that would severely reduce its functionality, wouldn't it?
It would be better for calibre to maintain the ASIN metadata from the get-go, but I'm pretty sure Kovid has indicated that he has no interest in doing that, at this time.
|