[
Quote:
Originally Posted by wzyboy
Currently, "KFX Output" plugin inserts ASIN into the ebook only if a real ten-digit ASIN startswith "B" exists.
|
The "Always create book instead of personal document" option in the KFX Output tab of the conversion dialog can be used to force the CDE type and generate a fake ASIN value. This is documented near the end of the "Showing Cover Thumbnail Images on E-Ink Kindle Devices" section in the first post of this thread.
What is currently lacking is code in calibre to extract the ASIN value from KFX files when creating cover thumbnail images on a kindle device. The existing code handles only azw/azw3 book format. Someone (not me) would need to submit a patch to calibre to fix this.
For now you can instead use the ExtractCoverThumbs program, which is already able to perform this function, as documented in the place I mentioned above.
Added:
A patch to calibre shouldn't be very difficult, but I have no interest in figuring out the details, testing and submitting it. In the code you highlighted the line:
Code:
mh = MetadataHeader(f, default_log)
extracts the metadata from a Mobi (azw/azw3) file. This would need to be changed to detect if the file is KFX format and use a different method of extracting metadata in that case. There is an example of how to do this earlier in kindle/driver.py.
Then, in the code that immediately follows, the cdetype and asin values extracted from the KFX file would be used instead of mh.exth.cdetype and mh.exth.uuid.