From 43ec4c2c9e79d4c8be24d590d14edf87f8c2a12f Mon Sep 17 00:00:00 2001 From: krateng Date: Tue, 19 Apr 2022 22:13:51 +0200 Subject: [PATCH] Reenabled bracket normalization for titles, GH-121 --- maloja/cleanup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/maloja/cleanup.py b/maloja/cleanup.py index 73bf56a..de47920 100644 --- a/maloja/cleanup.py +++ b/maloja/cleanup.py @@ -139,8 +139,10 @@ class CleanerAgent: if t.strip().lower() in self.rules_replacetitle: return self.rules_replacetitle[t.strip().lower()] - #t = t.replace("[","(").replace("]",")") + t = t.replace("[","(").replace("]",")") + # we'll leave these matching all bracket types so future changes + # won't require readaption t = re.sub(r" [\(\[]as made famous by .*?[\)\]]","",t) t = re.sub(r" [\(\[]originally by .*?[\)\]]","",t) t = re.sub(r" [\(\[].*?Remaster.*?[\)\]]","",t)