mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-24 16:04:00 +02:00
Fixes for a couple obscure Generate Cover issues.
This commit is contained in:
parent
e78cf1d7a7
commit
b408cef83f
3 changed files with 13 additions and 6 deletions
|
|
@ -552,7 +552,7 @@ class GenerateCoverTab(QWidget):
|
|||
self.gcnewonly.setChecked(prefs['gcnewonly'])
|
||||
self.l.addWidget(self.gcnewonly)
|
||||
|
||||
self.allow_gc_from_ini = QCheckBox('Allow generate_cover_settings from personal.ini to override.',self)
|
||||
self.allow_gc_from_ini = QCheckBox('Allow generate_cover_settings from personal.ini to override',self)
|
||||
self.allow_gc_from_ini.setToolTip("The personal.ini parameter generate_cover_settings allows you to choose a GC setting based on metadata rather than site, but it's much more complex.<br \>generate_cover_settings is ignored when this is off.")
|
||||
self.allow_gc_from_ini.setChecked(prefs['allow_gc_from_ini'])
|
||||
self.l.addWidget(self.allow_gc_from_ini)
|
||||
|
|
|
|||
|
|
@ -658,7 +658,6 @@ make_firstimage_cover:true
|
|||
custom_columns = self.gui.library_view.model().custom_columns
|
||||
if prefs['errorcol'] != '' and prefs['errorcol'] in custom_columns:
|
||||
label = custom_columns[prefs['errorcol']]['label']
|
||||
print("errorcol label:%s"%label)
|
||||
## if error column and all bad.
|
||||
self.previous = self.gui.library_view.currentIndex()
|
||||
LoopProgressDialog(self.gui,
|
||||
|
|
@ -784,7 +783,6 @@ make_firstimage_cover:true
|
|||
if prefs['errorcol'] != '' and prefs['errorcol'] in custom_columns:
|
||||
self.gui.status_bar.show_message(_('Adding/Updating %s BAD books.'%total_bad))
|
||||
label = custom_columns[prefs['errorcol']]['label']
|
||||
print("errorcol label:%s"%label)
|
||||
## if error column and all bad.
|
||||
LoopProgressDialog(self.gui,
|
||||
bad_list,
|
||||
|
|
@ -895,8 +893,13 @@ make_firstimage_cover:true
|
|||
db.set_custom(book_id, val, label=label, commit=False)
|
||||
|
||||
db.commit()
|
||||
|
||||
|
||||
if 'Generate Cover' in self.gui.iactions and (book['added'] or not prefs['gcnewonly']):
|
||||
|
||||
# force a refresh if generating cover so complex composite
|
||||
# custom columns are current and correct
|
||||
db.refresh_ids([book_id])
|
||||
|
||||
gc_plugin = self.gui.iactions['Generate Cover']
|
||||
setting_name = None
|
||||
if prefs['allow_gc_from_ini']:
|
||||
|
|
@ -911,7 +914,7 @@ make_firstimage_cover:true
|
|||
for line in adapter.getConfig('generate_cover_settings').splitlines():
|
||||
if "=>" in line:
|
||||
(template,regexp,setting) = map( lambda x: x.strip(), line.split("=>") )
|
||||
value = Template(template).substitute(book['all_metadata']).encode('utf8')
|
||||
value = Template(template).safe_substitute(book['all_metadata']).encode('utf8')
|
||||
print("%s(%s) => %s => %s"%(template,value,regexp,setting))
|
||||
if re.search(regexp,value):
|
||||
setting_name = setting
|
||||
|
|
@ -937,7 +940,6 @@ make_firstimage_cover:true
|
|||
## if error column set.
|
||||
if prefs['errorcol'] != '' and prefs['errorcol'] in custom_columns:
|
||||
label = custom_columns[prefs['errorcol']]['label']
|
||||
print("_update_book label:%s"%label)
|
||||
db.set_custom(book['calibre_id'], '', label=label, commit=True) # book['comment']
|
||||
|
||||
def _get_clean_reading_lists(self,lists):
|
||||
|
|
|
|||
|
|
@ -114,10 +114,15 @@ Some more longer description. "I suck at summaries!" "Better than it sounds!"
|
|||
self.story.addToList('category','Crossover')
|
||||
self.story.addToList('category',u'Puella Magi Madoka Magica/魔法少女まどか★マギカ')
|
||||
self.story.addToList('category',u'Magical Girl Lyrical Nanoha')
|
||||
|
||||
self.story.addToList('genre','Fantasy')
|
||||
self.story.addToList('genre','SF')
|
||||
self.story.addToList('genre','Noir')
|
||||
|
||||
self.story.addToList('characters','Bob Smith')
|
||||
self.story.addToList('characters','George Johnson')
|
||||
self.story.addToList('characters','Fred Smythe')
|
||||
|
||||
self.chapterUrls = [(u'Prologue '+self.crazystring,self.url+"&chapter=1"),
|
||||
('Chapter 1, Xenos on Cinnabar',self.url+"&chapter=2"),
|
||||
('Chapter 2, Sinmay on Kintikin',self.url+"&chapter=3"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue