mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
27d199a74b
commit
c66ec1c9f2
@ -211,8 +211,7 @@ class EPUBInput(InputFormatPlugin):
|
||||
cover_toc_item = item
|
||||
break
|
||||
spine = {x.href for x in oeb.spine}
|
||||
if (cover_toc_item is not None and cover_toc_item.count() == 0 and
|
||||
cover_toc_item not in spine):
|
||||
if (cover_toc_item is not None and cover_toc_item not in spine):
|
||||
oeb.toc.item_that_refers_to_cover = cover_toc_item
|
||||
|
||||
|
||||
|
@ -1015,7 +1015,7 @@ OptionRecommendation(name='search_replace',
|
||||
# Remove the toc reference to the html cover, if any, except for
|
||||
# epub, as the epub output plugin will do the right thing with it.
|
||||
item = getattr(self.oeb.toc, 'item_that_refers_to_cover', None)
|
||||
if item is not None:
|
||||
if item is not None and item.count() == 0:
|
||||
self.oeb.toc.remove(item)
|
||||
|
||||
from calibre.ebooks.oeb.transforms.flatcss import CSSFlattener
|
||||
|
Loading…
x
Reference in New Issue
Block a user