From 890d47928d77fcecc311fdeff389c6cb75281098 Mon Sep 17 00:00:00 2001 From: Broque Thomas Date: Fri, 27 Feb 2026 08:57:12 -0800 Subject: [PATCH] Fix AcoustID false rejections for tracks with featured artists in square brackets AcoustID sometimes returns featuring info in square brackets like [W/ Barnes Blvd.] instead of parentheses. The normalizer only stripped parenthetical featuring tags, so these tracks failed verification and got quarantined despite being correct. Now strips [W/ ...], [with ...], [feat. ...], and [ft. ...] bracket patterns too. --- core/acoustid_verification.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/acoustid_verification.py b/core/acoustid_verification.py index fff83dfd..4208ae74 100644 --- a/core/acoustid_verification.py +++ b/core/acoustid_verification.py @@ -40,8 +40,10 @@ def _normalize(text: str) -> str: s = text.lower().strip() # Remove common parenthetical suffixes like (Live), (Remastered), (2025 Remaster), (Radio Edit) s = re.sub(r'\s*\((?:live|(?:\d{4}\s*)?remaster(?:ed)?(?:\s*\d{4})?|deluxe|bonus|radio\s*edit|single\s*edit|album\s*edit|single\s*version|visualize.*?)\)', '', s, flags=re.IGNORECASE) - # Remove featuring info: "(feat. ...)", "(ft. ...)", "(featuring ...)" + # Remove featuring info in parentheses: "(feat. ...)", "(ft. ...)", "(featuring ...)" s = re.sub(r'\s*\((?:feat\.?|ft\.?|featuring)\s+[^)]*\)', '', s, flags=re.IGNORECASE) + # Remove featuring info in square brackets: "[feat. ...]", "[ft. ...]", "[W/ ...]", "[with ...]" + s = re.sub(r'\s*\[(?:feat\.?|ft\.?|featuring|w/|with)\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