From 1071337659793cfce88ea32b032736ba2c5b11a0 Mon Sep 17 00:00:00 2001 From: Broque Thomas Date: Mon, 16 Feb 2026 10:21:29 -0800 Subject: [PATCH] fix normalization issue on comparison with acoustID --- core/acoustid_verification.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/acoustid_verification.py b/core/acoustid_verification.py index 568daa5c..730165d0 100644 --- a/core/acoustid_verification.py +++ b/core/acoustid_verification.py @@ -38,6 +38,10 @@ def _normalize(text: str) -> str: s = text.lower().strip() # Remove common parenthetical suffixes like (Live), (Remastered), (Radio Edit) s = re.sub(r'\s*\((?:live|remaster(?:ed)?|deluxe|bonus|radio\s*edit|single\s*version|visualize.*?)\)', '', s, flags=re.IGNORECASE) + # Remove featuring info: "(feat. ...)", "(ft. ...)", "(featuring ...)" + s = re.sub(r'\s*\((?:feat\.?|ft\.?|featuring)\s+[^)]*\)', '', s, flags=re.IGNORECASE) + # Remove trailing featuring info: "feat. ...", "ft. ...", "featuring ..." + s = re.sub(r'\s+(?:feat\.?|ft\.?|featuring)\s+.*$', '', s, flags=re.IGNORECASE) # Remove non-alphanumeric except spaces s = re.sub(r'[^\w\s]', '', s) # Collapse whitespace