From 749bc274b37bb23cd267abb6df0a1852a8a4a256 Mon Sep 17 00:00:00 2001 From: nick2000713 Date: Fri, 12 Jun 2026 12:54:03 +0200 Subject: [PATCH] fix: treat colon as separator in normalize_string so T:T matches T_T --- core/matching_engine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/matching_engine.py b/core/matching_engine.py index 15f91f02..bd60aafe 100644 --- a/core/matching_engine.py +++ b/core/matching_engine.py @@ -115,7 +115,8 @@ class MusicMatchingEngine: # Replace common separators with spaces to preserve word boundaries. # Include hyphen in separator replacement for artist names like "AC/DC" vs "AC-DC" # Include '&' so "Pig&Dan" becomes "Pig Dan" (matches "Pig & Dan" on Soulseek) - text = re.sub(r'[._/&-]', ' ', text) + # Include ':' so "T:T" becomes "T T" (matches "T_T" stored with underscores on Soulseek) + text = re.sub(r'[._/&:\-]', ' ', text) # Keep alphanumeric characters, spaces, AND the '$' sign. # When CJK was detected upstream, also preserve CJK Unified