mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-28 01:42:34 +02:00
Remove Calibre Update Cover option entirely(was deprecated) #878
This commit is contained in:
parent
ccea7827ce
commit
4d322a8fae
5 changed files with 6 additions and 69 deletions
|
|
@ -70,8 +70,7 @@ from calibre_plugins.fanficfare_plugin.prefs import (
|
|||
|
||||
from calibre_plugins.fanficfare_plugin.dialogs import (
|
||||
UPDATE, UPDATEALWAYS, collision_order, save_collisions, RejectListDialog,
|
||||
EditTextDialog, IniTextDialog, RejectUrlEntry,
|
||||
updateepubcover_warning)
|
||||
EditTextDialog, IniTextDialog, RejectUrlEntry)
|
||||
|
||||
from fanficfare.adapters import getSiteSections, get_section_url
|
||||
|
||||
|
|
@ -280,7 +279,6 @@ class ConfigWidget(QWidget):
|
|||
prefs['collision'] = save_collisions[unicode(self.basic_tab.collision.currentText())]
|
||||
prefs['updatemeta'] = self.basic_tab.updatemeta.isChecked()
|
||||
prefs['bgmeta'] = self.basic_tab.bgmeta.isChecked()
|
||||
prefs['updateepubcover'] = self.basic_tab.updateepubcover.isChecked()
|
||||
prefs['keeptags'] = self.basic_tab.keeptags.isChecked()
|
||||
prefs['mark'] = self.basic_tab.mark.isChecked()
|
||||
prefs['mark_success'] = self.basic_tab.mark_success.isChecked()
|
||||
|
|
@ -492,22 +490,6 @@ class BasicTab(QWidget):
|
|||
|
||||
self.l.addLayout(horz)
|
||||
|
||||
label = QLabel(_("The <i><b>Update EPUB Cover</b></i> option is DEPRECATED and in future will always be ON.<br>"
|
||||
"For now you can still uncheck it here, but please see <a href='https://github.com/JimmXinu/FanFicFare/issues/878'>this issue</a> for more information."))
|
||||
label.setWordWrap(True)
|
||||
label.setOpenExternalLinks(True)
|
||||
self.l.addWidget(label)
|
||||
|
||||
self.updateepubcover = QCheckBox(_('Default Update EPUB Cover when Updating EPUB?'),self)
|
||||
self.updateepubcover.setToolTip(_("On each download, FanFicFare offers an option to update the book cover image <i>inside</i> the EPUB from the web site when the EPUB is updated.<br />This sets whether that will default to on or off."))
|
||||
self.updateepubcover.setChecked(prefs['updateepubcover'])
|
||||
self.l.addWidget(self.updateepubcover)
|
||||
|
||||
def updateepubcover_changed():
|
||||
if not self.updateepubcover.isChecked():
|
||||
updateepubcover_warning()
|
||||
self.updateepubcover.stateChanged.connect(updateepubcover_changed)
|
||||
|
||||
cali_gb = groupbox = QGroupBox(_("Updating Calibre Options"))
|
||||
self.l = QVBoxLayout()
|
||||
groupbox.setLayout(self.l)
|
||||
|
|
|
|||
|
|
@ -314,14 +314,6 @@ class AddNewDialog(SizePersistedDialog):
|
|||
self.mergehide.append(self.updatemeta)
|
||||
self.mergeupdateshow.append(self.updatemeta)
|
||||
|
||||
self.updateepubcover = QCheckBox(_('Update EPUB Cover?'),self)
|
||||
# self.updateepubcover.setToolTip(_('Update book cover image from site or defaults (if found) <i>inside</i> the EPUB when EPUB is updated.'))
|
||||
self.updateepubcover.setToolTip(_('This feature is being removed. See FanFicFare > Config > General.'))
|
||||
self.updateepubcover.setChecked(self.prefs['updateepubcover'])
|
||||
self.updateepubcover.setEnabled(False)
|
||||
horz.addWidget(self.updateepubcover)
|
||||
self.mergehide.append(self.updateepubcover)
|
||||
|
||||
self.gbl.addLayout(horz)
|
||||
|
||||
## bgmeta not used with Add New because of stories that change
|
||||
|
|
@ -451,11 +443,6 @@ class AddNewDialog(SizePersistedDialog):
|
|||
self.updatemeta.setChecked(self.prefs['updatemeta'])
|
||||
# self.bgmeta.setChecked(self.prefs['bgmeta'])
|
||||
|
||||
if not self.merge:
|
||||
self.updateepubcover.setChecked(self.prefs['updateepubcover'])
|
||||
if not self.prefs['updateepubcover']:
|
||||
updateepubcover_warning()
|
||||
|
||||
self.url.setText(url_list_text)
|
||||
if url_list_text:
|
||||
self.button_box.button(QDialogButtonBox.Ok).setFocus()
|
||||
|
|
@ -493,14 +480,12 @@ class AddNewDialog(SizePersistedDialog):
|
|||
'collision': unicode(self.collision.currentText()),
|
||||
'updatemeta': self.updatemeta.isChecked(),
|
||||
'bgmeta': False, # self.bgmeta.isChecked(),
|
||||
'updateepubcover': self.updateepubcover.isChecked(),
|
||||
'smarten_punctuation':self.prefs['smarten_punctuation'],
|
||||
'do_wordcount':self.prefs['do_wordcount'],
|
||||
}
|
||||
|
||||
if self.merge:
|
||||
retval['fileform']=='epub'
|
||||
retval['updateepubcover']=True
|
||||
if self.newmerge:
|
||||
retval['updatemeta']=True
|
||||
retval['collision']=ADDNEW
|
||||
|
|
@ -912,15 +897,6 @@ class UpdateExistingDialog(SizePersistedDialog):
|
|||
self.updatemeta.setChecked(self.prefs['updatemeta'])
|
||||
horz.addWidget(self.updatemeta)
|
||||
|
||||
self.updateepubcover = QCheckBox(_('Update EPUB Cover?'),self)
|
||||
# self.updateepubcover.setToolTip(_('Update book cover image from site or defaults (if found) <i>inside</i> the EPUB when EPUB is updated.'))
|
||||
self.updateepubcover.setToolTip(_('This feature is being removed. See FanFicFare > Config > General.'))
|
||||
self.updateepubcover.setEnabled(False)
|
||||
self.updateepubcover.setChecked(self.prefs['updateepubcover'])
|
||||
horz.addWidget(self.updateepubcover)
|
||||
if not self.prefs['updateepubcover']:
|
||||
updateepubcover_warning()
|
||||
|
||||
self.bgmeta = QCheckBox(_('Background Metadata?'),self)
|
||||
self.bgmeta.setToolTip(_("Collect Metadata from sites in a Background process.<br />This returns control to you quicker while updating, but you won't be asked for username/passwords or if you are an adult--stories that need those will just fail."))
|
||||
self.bgmeta.setChecked(self.prefs['bgmeta'])
|
||||
|
|
@ -972,7 +948,6 @@ class UpdateExistingDialog(SizePersistedDialog):
|
|||
'collision': unicode(self.collision.currentText()),
|
||||
'updatemeta': self.updatemeta.isChecked(),
|
||||
'bgmeta': self.bgmeta.isChecked(),
|
||||
'updateepubcover': self.updateepubcover.isChecked(),
|
||||
'smarten_punctuation':self.prefs['smarten_punctuation'],
|
||||
'do_wordcount':self.prefs['do_wordcount'],
|
||||
}
|
||||
|
|
@ -1713,12 +1688,3 @@ def question_dialog_all(parent, title, msg, det_msg='', show_copy_button=False,
|
|||
gprefs.set('questions_to_auto_skip', list(auto_skip))
|
||||
|
||||
return ret
|
||||
|
||||
from calibre.gui2.ui import get_gui
|
||||
def updateepubcover_warning():
|
||||
return confirm('<p>'+_("FanFicFare's <i><b>Update EPUB Cover</b></i> Download Option is being removed.")+'<\p>'+
|
||||
'<p>'+_("It was a very old setting that didn't quite do what users expected.")+'<\p>'+
|
||||
'<p>'+_("You are getting this warning because you have <i><b>Default Update EPUB Cover when Updating EPUB?</b></i> unchecked in FanFicFare > Config > General.")+'<\p>'+
|
||||
'<p>'+_("See <a href='https://github.com/JimmXinu/FanFicFare/issues/878'>this issue</a> for more information.")+'<\p>',
|
||||
'fff_updateepubcover_warning',
|
||||
get_gui(), show_cancel_button=False, title=_("FanFicFare Warning"))
|
||||
|
|
|
|||
|
|
@ -113,8 +113,7 @@ from calibre_plugins.fanficfare_plugin.dialogs import (
|
|||
LoopProgressDialog, UserPassDialog, AboutDialog, CollectURLDialog,
|
||||
RejectListDialog, EmailPassDialog,
|
||||
save_collisions, question_dialog_all,
|
||||
NotGoingToDownload, RejectUrlEntry,
|
||||
updateepubcover_warning)
|
||||
NotGoingToDownload, RejectUrlEntry)
|
||||
|
||||
# because calibre immediately transforms html into zip and don't want
|
||||
# to have an 'if html'. db.has_format is cool with the case mismatch,
|
||||
|
|
@ -591,15 +590,12 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
if prefs['download_from_email_immediately']:
|
||||
## do imap fetch w/o GUI elements
|
||||
if url_list:
|
||||
if prefs['updateepubcover'] == False:
|
||||
updateepubcover_warning()
|
||||
self.prep_downloads({
|
||||
'fileform': prefs['fileform'],
|
||||
# save_collisions==convert from save value to local lang value
|
||||
'collision': extraoptions.get('collision',save_collisions[prefs['collision']]),
|
||||
'updatemeta': prefs['updatemeta'],
|
||||
'bgmeta': False,
|
||||
'updateepubcover': prefs['updateepubcover'],
|
||||
'smarten_punctuation':prefs['smarten_punctuation'],
|
||||
'do_wordcount':prefs['do_wordcount'],
|
||||
'add_tag':prefs['imaptags'],
|
||||
|
|
@ -1237,8 +1233,7 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
options={'fileform':'epub',
|
||||
'collision':ADDNEW,
|
||||
'updatemeta':True,
|
||||
'bgmeta':False,
|
||||
'updateepubcover':True},
|
||||
'bgmeta':False},
|
||||
merge=False):
|
||||
'''
|
||||
Update passed in book dict with metadata from website and
|
||||
|
|
@ -1260,7 +1255,6 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
collision = book['collision'] = options['collision']
|
||||
updatemeta= options['updatemeta']
|
||||
bgmeta= options['bgmeta']
|
||||
updateepubcover= options['updateepubcover']
|
||||
|
||||
## Check reject list. Redundant with below for when story URL
|
||||
## changes, but also kept here to avoid network hit in most
|
||||
|
|
@ -1668,8 +1662,7 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
options={'fileform':'epub',
|
||||
'collision':ADDNEW,
|
||||
'updatemeta':True,
|
||||
'bgmeta':False,
|
||||
'updateepubcover':True},
|
||||
'bgmeta':False},
|
||||
merge=False):
|
||||
'''
|
||||
Called by LoopProgressDialog to start story downloads BG processing.
|
||||
|
|
@ -1798,8 +1791,7 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
options={'fileform':'epub',
|
||||
'collision':ADDNEW,
|
||||
'updatemeta':True,
|
||||
'bgmeta':False,
|
||||
'updateepubcover':True},
|
||||
'bgmeta':False},
|
||||
errorcol_label=None,
|
||||
lastcheckedcol_label=None):
|
||||
|
||||
|
|
|
|||
|
|
@ -222,9 +222,6 @@ def do_download_for_worker(book,options,merge,notification=lambda x,y:x):
|
|||
options['fileform'],
|
||||
options['personal.ini'])
|
||||
|
||||
if not options['updateepubcover'] and 'epub_for_update' in book and book['collision'] in (UPDATE, UPDATEALWAYS):
|
||||
configuration.set("overrides","never_make_cover","true")
|
||||
|
||||
# images only for epub, html, even if the user mistakenly
|
||||
# turned it on else where.
|
||||
if options['fileform'] not in ("epub","html"):
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ default_prefs['reject_delete_default'] = True
|
|||
|
||||
default_prefs['updatemeta'] = True
|
||||
default_prefs['bgmeta'] = False
|
||||
default_prefs['updateepubcover'] = True # removed in favor of always True Sep 2022
|
||||
#default_prefs['updateepubcover'] = True # removed in favor of always True Oct 2022
|
||||
default_prefs['keeptags'] = False
|
||||
default_prefs['suppressauthorsort'] = False
|
||||
default_prefs['suppresstitlesort'] = False
|
||||
|
|
|
|||
Loading…
Reference in a new issue