mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 13:34:33 +00:00
Added config.ini option to reduce Total issues by Ignored status counts for a given series (ignore_total). Note, that you cannot have both ignore_total AND ignore_havetotal enabled - both will be disabledeach until only one is enabled)
This commit is contained in:
parent
488f2934b7
commit
4a2015c549
2 changed files with 16 additions and 1 deletions
|
@ -52,6 +52,7 @@ _CONFIG_DEFINITIONS = OrderedDict({
|
|||
'ZERO_LEVEL_N': (str, 'General', None),
|
||||
'LOWERCASE_FILENAMES': (bool, 'General', False),
|
||||
'IGNORE_HAVETOTAL': (bool, 'General', False),
|
||||
'IGNORE_TOTAL': (bool, 'General', False),
|
||||
'SNATCHED_HAVETOTAL': (bool, 'General', False),
|
||||
'FAILED_DOWNLOAD_HANDLING': (bool, 'General', False),
|
||||
'FAILED_AUTO': (bool, 'General',False),
|
||||
|
@ -72,6 +73,7 @@ _CONFIG_DEFINITIONS = OrderedDict({
|
|||
'CREATE_FOLDERS': (bool, 'General', True),
|
||||
'ALTERNATE_LATEST_SERIES_COVERS': (bool, 'General', False),
|
||||
'SHOW_ICONS': (bool, 'General', False),
|
||||
'FORMAT_BOOKTYPE': (bool, 'General', False),
|
||||
|
||||
'RSS_CHECKINTERVAL': (int, 'Scheduler', 20),
|
||||
'SEARCH_INTERVAL': (int, 'Scheduler', 360),
|
||||
|
@ -808,6 +810,11 @@ class Config(object):
|
|||
elif all([self.HTTP_USERNAME is None, self.HTTP_PASSWORD is None]):
|
||||
self.AUTHENTICATION = 0
|
||||
|
||||
if all([self.IGNORE_TOTAL is True, self.IGNORE_HAVETOTAL is True]):
|
||||
self.IGNORE_TOTAL = False
|
||||
self.IGNORE_HAVETOTAL = False
|
||||
logger.warn('You cannot have both ignore_total and ignore_havetotal enabled in the config.ini at the same time. Set only ONE to true - disabling both until this is resolved.')
|
||||
|
||||
#comictagger - force to use included version if option is enabled.
|
||||
if self.ENABLE_META:
|
||||
mylar.CMTAGGER_PATH = mylar.PROG_DIR
|
||||
|
|
|
@ -1546,7 +1546,15 @@ def forceRescan(ComicID, archive=None, module=None, recheck=False):
|
|||
havefiles = havefiles + archivedissues #arcfiles already tallied in havefiles in above segment
|
||||
|
||||
#combined total for dispay total purposes only.
|
||||
combined_total = iscnt + anncnt #(rescan['Total'] + anncnt)
|
||||
combined_total = iscnt + anncnt
|
||||
if mylar.CONFIG.IGNORE_TOTAL: # if this is enabled, will increase Have total as if in Archived Status
|
||||
ignoresa = myDB.select("SELECT count(*) FROM issues WHERE ComicID=? AND Status='Ignored'", [ComicID])
|
||||
ignoresb = myDB.select("SELECT count(*) FROM annuals WHERE ComicID=? AND Status='Ignored'", [ComicID])
|
||||
ignorecnt = ignoresa[0][0] + ignoresb[0][0]
|
||||
|
||||
if ignorecnt > 0:
|
||||
combined_total -= ignorecnt
|
||||
logger.fdebug('%s Reducing total comics in series from %s to %s because of %s ignored files.' % (module, (iscnt+anncnt), combined_total, ignorecnt))
|
||||
|
||||
#quick check
|
||||
if havefiles > combined_total:
|
||||
|
|
Loading…
Reference in a new issue