From 3a23924721e7e4c8293af558648bcf81734b6e6c Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 17 Jun 2020 17:15:33 -0500 Subject: [PATCH] Check for epub before polishing cover into it. --- calibre-plugin/fff_plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calibre-plugin/fff_plugin.py b/calibre-plugin/fff_plugin.py index 43e5448b..d2909af0 100644 --- a/calibre-plugin/fff_plugin.py +++ b/calibre-plugin/fff_plugin.py @@ -2293,7 +2293,8 @@ class FanFicFarePlugin(InterfaceAction): cover_generated = True if cover_generated and prefs['gc_polish_cover'] and \ - options['fileform'] == "epub": + options['fileform'] == "epub" and \ + db.has_format(book['calibre_id'],'EPUB',index_is_id=True) : # set cover inside epub from calibre's polish feature from calibre.ebooks.oeb.polish.main import polish, ALL_OPTS from calibre.utils.logging import Log