mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-23 17:23:40 +01:00
Make check for changing story URL configurable.
This commit is contained in:
parent
6414a09dbd
commit
e8e93b010a
4 changed files with 14 additions and 7 deletions
|
|
@ -177,6 +177,7 @@ class ConfigWidget(QWidget):
|
|||
prefs['includeimages'] = self.basic_tab.includeimages.isChecked()
|
||||
prefs['lookforurlinhtml'] = self.basic_tab.lookforurlinhtml.isChecked()
|
||||
prefs['checkforseriesurlid'] = self.basic_tab.checkforseriesurlid.isChecked()
|
||||
prefs['checkforurlchange'] = self.basic_tab.checkforurlchange.isChecked()
|
||||
prefs['injectseries'] = self.basic_tab.injectseries.isChecked()
|
||||
prefs['smarten_punctuation'] = self.basic_tab.smarten_punctuation.isChecked()
|
||||
|
||||
|
|
@ -352,6 +353,11 @@ class BasicTab(QWidget):
|
|||
self.checkforseriesurlid.setChecked(prefs['checkforseriesurlid'])
|
||||
self.l.addWidget(self.checkforseriesurlid)
|
||||
|
||||
self.checkforurlchange = QCheckBox("Check for changed Story URL?",self)
|
||||
self.checkforurlchange.setToolTip("Warn you if an update will change the URL of an existing book.")
|
||||
self.checkforurlchange.setChecked(prefs['checkforurlchange'])
|
||||
self.l.addWidget(self.checkforurlchange)
|
||||
|
||||
self.lookforurlinhtml = QCheckBox("Search EPUB text for Story URL?",self)
|
||||
self.lookforurlinhtml.setToolTip("Look for first valid story URL inside EPUB text if not found in metadata.\nSomewhat risky, could find wrong URL depending on EPUB content.\nAlso finds and corrects bad ffnet URLs from ficsaver.com files.")
|
||||
self.lookforurlinhtml.setChecked(prefs['lookforurlinhtml'])
|
||||
|
|
@ -503,7 +509,7 @@ class PersonalIniTab(QWidget):
|
|||
self.ini = QTextEdit(self)
|
||||
try:
|
||||
self.ini.setFont(QFont("Courier",
|
||||
self.plugin_action.gui.font().pointSize()+1));
|
||||
self.plugin_action.gui.font().pointSize()+1))
|
||||
except Exception as e:
|
||||
print("Couldn't get font: %s"%e)
|
||||
self.ini.setLineWrapMode(QTextEdit.NoWrap)
|
||||
|
|
@ -539,7 +545,7 @@ class ShowDefaultsIniDialog(QDialog):
|
|||
self.ini.setToolTip("These are all of the plugin's configurable options\nand their default settings.")
|
||||
try:
|
||||
self.ini.setFont(QFont("Courier",
|
||||
get_gui().font().pointSize()+1));
|
||||
get_gui().font().pointSize()+1))
|
||||
except Exception as e:
|
||||
print("Couldn't get font: %s"%e)
|
||||
self.ini.setLineWrapMode(QTextEdit.NoWrap)
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ class DroppableQTextEdit(QTextEdit):
|
|||
|
||||
def canInsertFromMimeData(self, source):
|
||||
if source.hasUrls():
|
||||
return True;
|
||||
return True
|
||||
else:
|
||||
return QTextEdit.canInsertFromMimeData(self,source)
|
||||
|
||||
|
|
@ -208,7 +208,7 @@ class AddNewDialog(SizePersistedDialog):
|
|||
self.groupbox.setChecked(False)
|
||||
self.groupbox.setFlat(True)
|
||||
print("style:%s"%self.groupbox.styleSheet())
|
||||
self.groupbox.setStyleSheet(gpstyle);
|
||||
self.groupbox.setStyleSheet(gpstyle)
|
||||
|
||||
self.gbf = QFrame()
|
||||
self.gbl = QVBoxLayout()
|
||||
|
|
|
|||
|
|
@ -628,7 +628,7 @@ class FanFictionDownLoaderPlugin(InterfaceAction):
|
|||
return
|
||||
|
||||
if not id_list:
|
||||
id_list = self.gui.library_view.get_selected_ids();
|
||||
id_list = self.gui.library_view.get_selected_ids()
|
||||
|
||||
if len(id_list) == 0:
|
||||
self.gui.status_bar.show_message(_('No Selected Books to Update'), 3000)
|
||||
|
|
@ -918,7 +918,7 @@ class FanFictionDownLoaderPlugin(InterfaceAction):
|
|||
|
||||
if book_id and mi: # book_id and mi only set if matched by title/author.
|
||||
liburl = self.get_story_url(db,book_id)
|
||||
if book['url'] != liburl:
|
||||
if book['url'] != liburl and prefs['checkforurlchange']:
|
||||
if collision in (OVERWRITE,OVERWRITEALWAYS):
|
||||
updat="overwrit"
|
||||
else:
|
||||
|
|
@ -1852,7 +1852,7 @@ class FanFictionDownLoaderPlugin(InterfaceAction):
|
|||
book['title'] = series
|
||||
for sr in serieslist:
|
||||
if series != sr:
|
||||
book['title'] = deftitle;
|
||||
book['title'] = deftitle
|
||||
break
|
||||
|
||||
configuration = get_ffdl_config(book['url'],fileform)
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ default_prefs['adddialogstaysontop'] = False
|
|||
default_prefs['includeimages'] = False
|
||||
default_prefs['lookforurlinhtml'] = False
|
||||
default_prefs['checkforseriesurlid'] = True
|
||||
default_prefs['checkforurlchange'] = True
|
||||
default_prefs['injectseries'] = False
|
||||
default_prefs['smarten_punctuation'] = False
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue