1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added ignoreartist rule

This commit is contained in:
Krateng 2019-09-05 14:46:34 +02:00
parent 390118cdd8
commit 2efe2967f6

View File

@ -16,6 +16,7 @@ class CleanerAgent:
self.rules_notanartist = [b for [a,b,c] in raw if a=="notanartist"]
self.rules_replacetitle = {b.lower():c for [a,b,c] in raw if a=="replacetitle"}
self.rules_replaceartist = {b.lower():c for [a,b,c] in raw if a=="replaceartist"}
self.rules_ignoreartist = [b.lower() for [a,b,c] in raw if a=="ignoreartist"]
# we always need to be able to tell if our current database is made with the current rules
self.checksums = utilities.checksumTSV("rules")
@ -55,6 +56,9 @@ class CleanerAgent:
if a.strip() in settings.get_settings("INVALID_ARTISTS"):
return []
if a.strip().lower() in self.rules_ignoreartist:
return []
if a.strip() == "":
return []