View Single Post
Old 05-07-2012, 04:35 AM   #377
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,733
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by kovidgoyal View Post
Its not absolutely trivial. IIRC going into the Books section of the Fire requires two things: 1) a cdetype of EBOK 2) the presence of an asin field both in the EXTH header.

Also, the Fire has been known to crash with a few MOBI files when they have non Amazon asin values.

But if you want to do the check, use the MetadataHeader class, you will have to make a couple of changes to the EXTH class to store the raw cdetype and asin values so you plugin can handle them. Easily acheived by subclassing EXTH. See metadata/mobi.py for examples of using MetadataHeader.
Thanks very much Kovid, I had a suspicion it wasn't trivial. I will put it on the rainy day list to take a look at.
kiwidude is offline   Reply With Quote