Calibre 0.8.19 included
changes intended to allow social sharing of non amazon items to work on Kindle. The way it did this is by not writing the ASIN out to the mobi file if a preference option is set.
However this does not work as intended. Removal of the ASIN does not allow sharing on the kindle.
There are three functions a kindle user might wish to do which are affected by the ASIN:
1) Sync last page read between devices
2) Tweet or facebook a quote from a book
3) Tweet or facebook when book is completed
Function 1 requires CDEContentType=EBOK, and a unique ASIN. ASIN does not have to be valid, ie does not have to point to valid amazon product
Function 2 requires either no CDEContentType, or CDEContentType=PDOC (note that CDEContentType=EBOK will allow tweeting, but will not include the quote, so it's kinda pointless)
Function 3 requires CDEContentType=EBOK, and a valid ASIN, ie pointing to an amazon product
Therefore the best way to fix sharing (and as a bonus, keep "last page read" sync) would be:
1) If book is linked to Amazon, store the ASIN in metadata
2) Check if book has an ASIN in metadata. If so, put ASIN in ASIN EXTH, and keep the CDEContentType of EBOK.
3) If book does not have an ASIN in meta data, check the new preference option added in last release (share_not_sync). If set, do not write CDEContentType=EBOK header (this will allow sharing of quotes). If not set, write CDEContentType=EBOK. In both cases write the calibre unique id as the ASIN.
This gives the option for users to link their some books to amazon, and preserves the choice (sharing or sycning) for content that isn't on amazon.
From a forum search, it looks like siebert
posted a patch to pull ASINs from the amazon meta data plugin and put them into the EXTH. However I'm not sure if this patch was ever applied.
If someone can confirm my thinking above, and maybe give me some history on siebert's patch, I can merge the patch with the latest changes, test the various scenarios, and supply a new patch.