AZW3 Output: When converting EPUB files that include an HTML titlepage no external cover is specified, ensure that the Go to cover action on the Kindle goes to the cover image and not the html titlepage. Fixes #1268657 [Wrong metadata.opf generated for cover in EPUB to AZW3 conversion](https://bugs.launchpad.net/calibre/+bug/1268657)

This commit is contained in:
Kovid Goyal 2014-01-14 10:39:49 +05:30
parent cc27dfd9ce
commit 3b2c12219c

View File

@ -139,6 +139,10 @@ class MergeMetadata(object):
if cdata:
self.oeb.guide.remove('cover')
self.oeb.guide.remove('titlepage')
elif self.oeb.plumber_output_format in {'mobi', 'azw3'}:
# The amazon formats dont support html cover pages, so remove them
# even if no cover was specified.
self.oeb.guide.remove('titlepage')
if old_cover is not None:
if old_cover.href in self.oeb.manifest.hrefs:
item = self.oeb.manifest.hrefs[old_cover.href]