mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
Add 'Series [0]' option for new anthologies.
This commit is contained in:
parent
71fff8511b
commit
fe6e0263b8
4 changed files with 413 additions and 395 deletions
|
|
@ -5,7 +5,7 @@ from __future__ import (unicode_literals, division, absolute_import,
|
|||
import six
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2019, Jim Miller'
|
||||
__copyright__ = '2020, Jim Miller'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import logging
|
||||
|
|
@ -366,6 +366,7 @@ class ConfigWidget(QWidget):
|
|||
prefs['suppresstitlesort'] = self.std_columns_tab.suppresstitlesort.isChecked()
|
||||
prefs['authorcase'] = self.std_columns_tab.authorcase.isChecked()
|
||||
prefs['titlecase'] = self.std_columns_tab.titlecase.isChecked()
|
||||
prefs['setanthologyseries'] = self.std_columns_tab.setanthologyseries.isChecked()
|
||||
|
||||
prefs['set_author_url'] =self.std_columns_tab.set_author_url.isChecked()
|
||||
prefs['includecomments'] =self.std_columns_tab.includecomments.isChecked()
|
||||
|
|
@ -1533,6 +1534,11 @@ class StandardColumnsTab(QWidget):
|
|||
+"\n"+_("This effects Calibre metadata only, not FanFicFare metadata in title page."))
|
||||
self.authorcase.setChecked(prefs['authorcase'])
|
||||
row.append(self.authorcase)
|
||||
elif key == 'series':
|
||||
self.setanthologyseries = QCheckBox(_("Set 'Series [0]' for New Anthologies?"),self)
|
||||
self.setanthologyseries.setToolTip(_("If checked, the Series column will be set to 'Series Name [0]' when an Anthology for a series is first created."))
|
||||
self.setanthologyseries.setChecked(prefs['setanthologyseries'])
|
||||
row.append(self.setanthologyseries)
|
||||
|
||||
grid = QGridLayout()
|
||||
for rownum, row in enumerate(rows):
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import six
|
|||
from six.moves import range
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2019, Jim Miller'
|
||||
__copyright__ = '2020, Jim Miller'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from .fanficfare.six import string_types, text_type as unicode
|
||||
|
|
@ -2232,10 +2232,11 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
logger.info("Failed to set_cover, skipping")
|
||||
|
||||
# First, should cover generation happen at all?
|
||||
logger.debug("book['all_metadata']['cover_image']:%s"%book['all_metadata']['cover_image'])
|
||||
if (book['added'] or not prefs['gcnewonly']) and ( # skip if not new book and gcnewonly is True
|
||||
prefs['gencalcover'] == SAVE_YES ## yes, always
|
||||
or (prefs['gencalcover'] == SAVE_YES_UNLESS_IMG ## yes, unless image.
|
||||
and book['all_metadata']['cover_image'] not in ('specific','first','default')) ):
|
||||
and not book['all_metadata']['cover_image']) ): # not in ('specific','first','default','old')
|
||||
|
||||
cover_generated = False # flag for polish below.
|
||||
# Yes, should do gencov. Which?
|
||||
|
|
@ -2691,6 +2692,8 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
if series != sr:
|
||||
book['title'] = deftitle
|
||||
break
|
||||
if prefs['setanthologyseries'] and book['title'] == series:
|
||||
book['series'] = series+' [0]'
|
||||
|
||||
logger.debug("anthology_title_pattern:%s"%configuration.getConfig('anthology_title_pattern'))
|
||||
if configuration.getConfig('anthology_title_pattern'):
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ default_prefs['suppressauthorsort'] = False
|
|||
default_prefs['suppresstitlesort'] = False
|
||||
default_prefs['authorcase'] = False
|
||||
default_prefs['titlecase'] = False
|
||||
default_prefs['setanthologyseries'] = False
|
||||
default_prefs['mark'] = False
|
||||
default_prefs['showmarked'] = False
|
||||
default_prefs['autoconvert'] = False
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue