mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 02:43:37 +02:00
EPUB Output: Add option to turn off the generation of the default cover
This commit is contained in:
parent
41df24137a
commit
649fabf23d
1 changed files with 6 additions and 0 deletions
|
|
@ -77,6 +77,10 @@ class EPUBOutput(OutputFormatPlugin):
|
|||
'for Adobe Digital Editions.')
|
||||
),
|
||||
|
||||
OptionRecommendation(name='no_default_epub_cover', recommended_value=False,
|
||||
help=_('Normally, if the input file ahs no cover and you don\'t'
|
||||
' specify one, a default cover is generated with the title, '
|
||||
'authors, etc. This option disables the generation of this cover.')),
|
||||
|
||||
])
|
||||
|
||||
|
|
@ -188,6 +192,8 @@ def default_cover(self):
|
|||
'''
|
||||
Create a generic cover for books that dont have a cover
|
||||
'''
|
||||
if self.opts.no_default_epub_cover:
|
||||
return None
|
||||
try:
|
||||
from calibre.gui2 import images_rc, is_ok_to_use_qt # Needed for access to logo
|
||||
from PyQt4.Qt import QFile, QIODevice
|
||||
|
|
|
|||
Loading…
Reference in a new issue