From 1c053ef615a4881d62139bda32fd85fbb5bf941e Mon Sep 17 00:00:00 2001 From: David Date: Sun, 6 Nov 2016 14:58:41 +1100 Subject: [PATCH] Kepubs should follow epub rules for covers and ToC From http://www.mobileread.com/forums/showthread.php?p=3421577#post3421577, when an epub is converted to kepub, if the ToC had an entry pointing to the cover, it is removed. This does not happen when doing an epub-to-epub conversion. Found that the Plumber was treating epubs specially for this, so added kepub as another exception. --- src/calibre/ebooks/conversion/plumber.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/conversion/plumber.py b/src/calibre/ebooks/conversion/plumber.py index 1a3e6e5503..88d3d6dbff 100644 --- a/src/calibre/ebooks/conversion/plumber.py +++ b/src/calibre/ebooks/conversion/plumber.py @@ -1111,7 +1111,7 @@ OptionRecommendation(name='search_replace', pr(0.35) self.flush() - if self.output_plugin.file_type != 'epub': + if self.output_plugin.file_type not in ('epub', 'kepub'): # 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)