From 2efe2967f6291ee731c175b6df8b8eb5c329e84e Mon Sep 17 00:00:00 2001 From: Krateng Date: Thu, 5 Sep 2019 14:46:34 +0200 Subject: [PATCH] Added ignoreartist rule --- cleanup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cleanup.py b/cleanup.py index 326ff6a..91acdde 100644 --- a/cleanup.py +++ b/cleanup.py @@ -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 []