1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2025-02-02 04:21:43 +00:00

FIX: Blacklisted_Publishers (config.ini entry only) now fixed to limit search/import results

This commit is contained in:
evilhero 2016-04-07 14:45:36 -04:00
parent d26fc2c743
commit 19bf048fbb
2 changed files with 8 additions and 13 deletions

View file

@ -644,11 +644,9 @@ def initialize():
INDIE_PUB = check_setting_str(CFG, 'General', 'indie_pub', '75')
BIGGIE_PUB = check_setting_str(CFG, 'General', 'biggie_pub', '55')
flattened_blacklisted_pub = check_setting_str(CFG, 'General', 'blacklisted_publishers', [], log=False)
if len(flattened_blacklisted_pub) == 0 or flattened_blacklisted_pub == 'None':
BLACKLISTED_PUBLISHERS = check_setting_str(CFG, 'General', 'blacklisted_publishers', [], log=False)
if len(BLACKLISTED_PUBLISHERS) == 0 or BLACKLISTED_PUBLISHERS == 'None':
BLACKLISTED_PUBLISHERS = None
else:
BLACKLISTED_PUBLISHERS = list(itertools.izip(*[itertools.islice(flattened_blacklisted_pub, i, None, 1) for i in range(1)]))
ENABLE_RSS = bool(check_setting_int(CFG, 'General', 'enable_rss', 1))
RSS_CHECKINTERVAL = check_setting_str(CFG, 'General', 'rss_checkinterval', '20')
@ -1286,11 +1284,8 @@ def config_write():
flattened_blacklisted_pub = None
else:
flattened_blacklisted_pub = []
for bpub in BLACKLISTED_PUBLISHERS:
#for key, value in pro.items():
for item in bpub:
flattened_blacklisted_pub.append(item)
#flattened_providers.append(str(value))
for item in BLACKLISTED_PUBLISHERS:
flattened_blacklisted_pub.append(item)
new_config['General']['blacklisted_publishers'] = flattened_blacklisted_pub
new_config['General']['imp_move'] = int(IMP_MOVE)
new_config['General']['imp_rename'] = int(IMP_RENAME)

View file

@ -303,12 +303,12 @@ def findComic(name, mode, issue, limityear=None, explicit=None, type=None):
xmlpub = "Unknown"
else:
xmlpub = "Unknown"
logger.info('publisher: ' + xmlpub)
#ignore specific publishers on a global scale here.
#if mylar.BLACKLISTED_PUBLISHERS in xmlpub.lower(): #any([x for x in mylar.BLACKLISTED_PUBLISHERS if x.lower() == xmlpub.lower()]):
if mylar.BLACKLISTED_PUBLISHERS is not None and any([x for x in mylar.BLACKLISTED_PUBLISHERS if x.lower() == xmlpub.lower()]):
# #'panini' in xmlpub.lower() or 'deagostini' in xmlpub.lower() or 'Editorial Televisa' in xmlpub.lower():
# logger.fdebug('Blacklisted publisher [' + xmlpub + ']. Ignoring this result.')
# continue
logger.fdebug('Blacklisted publisher [' + xmlpub + ']. Ignoring this result.')
continue
try:
xmldesc = result.getElementsByTagName('description')[0].firstChild.wholeText