Fix #2038961 [E-book viewer: two cover pages for an AZW3 book](https://bugs.launchpad.net/calibre/+bug/2038961)

This commit is contained in:
Kovid Goyal 2023-10-16 18:44:10 +05:30
parent ac0ae71ae8
commit b9385fb982
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1489,6 +1489,8 @@ def epub_to_azw3(epub, outpath=None):
guide.append(guide.makeelement(OPF('reference'), type='cover', href=href))
changed = True
break
elif 'calibre:title-page' in p:
item.getparent().remove(item)
if changed:
container.dirty(container.opf_name)
container.commit_item(container.opf_name)