EPUB Output: Fix duplicated title page entry in spine for books that define a titlepage that ends up getting split. Fixes #2035579 [Private bug](https://bugs.launchpad.net/calibre/+bug/2035579)

This commit is contained in:
Kovid Goyal 2023-09-21 09:53:31 +05:30
parent ded1932795
commit 85ec0e6fbf
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -159,6 +159,8 @@ class CoverManager:
item = self.oeb.manifest.hrefs[
urldefrag(self.oeb.guide['titlepage'].href)[0]]
if item is not None:
if item in self.oeb.spine:
self.oeb.spine.remove(item)
self.oeb.spine.insert(0, item, True)
if 'cover' not in self.oeb.guide.refs:
self.oeb.guide.add('cover', 'Title page', 'a')