Wrong metadata.opf generated for cover in EPUB to AZW3 conversion
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
calibre 1.19 portable running under Windows 7 Home Premium SP1
This bug (well, I'm still not sure it is a bug) is a bit difficult to explain.
Let's say I have a very simple EPUB with an included cover. There is also an HTML cover, and the metadata regarding the cover looks like this:
<metadata xmlns:dc="http://
[...]
<meta name="cover" content="cover.jpg" />
</metadata>
<manifest>
<item href="Text/
<item href="Images/
[...]
</manifest>
<spine toc="ncx">
<itemref idref="cover.xhtml" />
[...]
</spine>
<guide>
<reference href="Text/
<reference href="Text/
<reference href="Text/
<reference href="Text/
</guide>
When converting to AZW3 using "ebook-convert.exe test.epub test.azw3" I expected to have this in the guide part of metadata.opf file of the resulting AZW3 file:
<guide>
<reference href="text/
<reference href="text/
<reference href="text/
<reference href="images/
<reference href="images/
<reference href="images/
</guide>
Instead, I get this:
<guide>
<reference href="text/
<reference href="text/
<reference href="text/
<reference href="text/
<reference href="images/
<reference href="images/
<reference href="images/
</guide>
That is, "Title Page" appears twice but the first one is the HTML cover, and that shows in the Go To menu of my Kindle Touch.
Now, the weirdest part. If I do the conversion using the GUI, with default options, I actually get the correct guide, works like a charm, UNLESS I check the "Use cover from source file" option. If I check that option, then I get the wrong guide.
I've debugged the output and the only difference is that the GUI, by default (that is, "Use cover from source file" unchecked), dumps the cover to an external file and uses the "--cover" option in ebook-convert. Since the command line tool uses the internal cover, it always shows the problem.
Also, both in the GUI and ebook-convert, I get this message and I don't know if it is related to this behaviour:
Spine-referenced file u'OEBPS/
Thanks again in advance.
Since I can't attach all files in this bug report I'm providing you some links:
https:/
https:/
https:/
Again, thanks
Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.
status fixreleased