View Single Post
Old 06-28-2024, 11:39 PM   #1190
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,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by zzjing View Post
I decided to try to look at the code and see if I can hack it. In the process, I think I have found a bug in "Check missing EBOK cdetype". It seems that exth.cdetype is a byte string, so in check_mobi.py:
Code:
if exth.cdetype == 'EBOK':
always fails, and should be changed to
Code:
if exth.cdetype == b'EBOK':
Hope this helps.
Thanks for that, I can apply that fix. However I admit I know zero about MOBI format (this feature was added by someone else to the plugin). From looking at the code the existing "Fix ASIN for Kindle Fire" code actually sets the EBOK value to the asin for the book. So I am confused as to what you would try to do by adding another "Fix" feature to this plugin - what else is it going to set the EBOK value to?

In other words - if I push a new version of the plugin that corrects the bug allowing you to identify MOBI files that have no EBOK header set, is there any reason why you would not just then use the existing "Fix ASIN" feature to then change the books?
kiwidude is offline   Reply With Quote