mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-26 19:00:03 +01:00
Only apply covernewonly to setting cover from epub--not GC.
This commit is contained in:
parent
1d2006761d
commit
4a58c43af9
2 changed files with 8 additions and 12 deletions
|
|
@ -1013,12 +1013,6 @@ class CalibreCoverTab(QWidget):
|
|||
self.l.addWidget(label)
|
||||
self.l.addSpacing(5)
|
||||
|
||||
self.covernewonly = QCheckBox(_("Set Covers Only for New Books"),self)
|
||||
self.covernewonly.setToolTip(_("Set or generate a Calibre cover only for new books, never for updated books."))
|
||||
self.covernewonly.setChecked(prefs['covernewonly'])
|
||||
self.l.addWidget(self.covernewonly)
|
||||
self.l.addSpacing(5)
|
||||
|
||||
tooltip = _("Update Calibre book cover image from EPUB when Calibre metadata is updated.\n"
|
||||
"Doesn't go looking for new images on 'Update Calibre Metadata Only'.\n"
|
||||
"Cover in EPUB could be from site or previously injected into the EPUB.\n"
|
||||
|
|
@ -1042,6 +1036,12 @@ class CalibreCoverTab(QWidget):
|
|||
horz.addWidget(self.updatecalcover)
|
||||
self.l.addLayout(horz)
|
||||
|
||||
self.covernewonly = QCheckBox(_("Set Covers Only for New Books"),self)
|
||||
self.covernewonly.setToolTip(_("Set a Calibre cover only for new books, never for updated books."))
|
||||
self.covernewonly.setChecked(prefs['covernewonly'])
|
||||
self.l.addWidget(self.covernewonly)
|
||||
self.l.addSpacing(5)
|
||||
|
||||
tooltip = _("Generate a Calibre book cover image when Calibre metadata is updated.<br />"
|
||||
"Defaults to 'Yes, Always' for backward compatibility and because %(gc)s(Plugin)"
|
||||
" will only run if configured for Default or site.")%no_trans
|
||||
|
|
|
|||
|
|
@ -2473,14 +2473,10 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
|
||||
db.commit()
|
||||
|
||||
# First, should cover generation happen at all?
|
||||
# everything after here is cover processing.
|
||||
if not book['added'] and prefs['covernewonly']:
|
||||
return
|
||||
|
||||
logger.info("cover_image:%s"%book['all_metadata']['cover_image'])
|
||||
# updating calibre cover from book.
|
||||
if options['fileform'] == 'epub' and (
|
||||
if options['fileform'] == 'epub' and \
|
||||
( book['added'] or not prefs['covernewonly'] ) and (
|
||||
(prefs['updatecover'] and not prefs['updatecalcover']) ## backward compat
|
||||
or prefs['updatecalcover'] == SAVE_YES ## yes, always
|
||||
or (prefs['updatecalcover'] == SAVE_YES_IF_IMG ## yes, if image.
|
||||
|
|
|
|||
Loading…
Reference in a new issue