From b9385fb9826ab9078261f4809769d4150d240e46 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 16 Oct 2023 18:44:10 +0530 Subject: [PATCH] Fix #2038961 [E-book viewer: two cover pages for an AZW3 book](https://bugs.launchpad.net/calibre/+bug/2038961) --- src/calibre/ebooks/oeb/polish/container.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index b397d14078..4dc6f0ea4b 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -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)