This commit is contained in:
Broque Thomas 2025-07-24 16:27:54 -07:00
parent f1e4539936
commit a2d64e9953
2 changed files with 8 additions and 1 deletions

View file

@ -24,6 +24,7 @@ class MusicMatchingEngine:
def __init__(self): def __init__(self):
# More comprehensive patterns to strip extra info from titles # More comprehensive patterns to strip extra info from titles
self.title_patterns = [ self.title_patterns = [
# Patterns inside parentheses or brackets
r'\(feat\.?.*\)', r'\(feat\.?.*\)',
r'\[feat\.?.*\]', r'\[feat\.?.*\]',
r'\(with.*\)', r'\(with.*\)',
@ -35,11 +36,16 @@ class MusicMatchingEngine:
r'\(radio edit\)', r'\(radio edit\)',
r'\(album version\)', r'\(album version\)',
r'\(original mix\)', r'\(original mix\)',
# Patterns after a hyphen
r'-\s*single version', r'-\s*single version',
r'-\s*remaster.*', r'-\s*remaster.*',
r'-\s*live.*', r'-\s*live.*',
r'-\s*remix', r'-\s*remix',
r'-\s*radio edit', r'-\s*radio edit',
# NEW: Patterns in the open title string (not in brackets)
r'\s+feat\.?.*',
r'\s+ft\.?.*',
r'\s+featuring.*'
] ]
self.artist_patterns = [ self.artist_patterns = [

View file

@ -8,3 +8,4 @@ cryptography>=41.0.0
mutagen>=1.47.0 mutagen>=1.47.0
Pillow>=10.0.0 Pillow>=10.0.0
aiohttp>=3.9.0 aiohttp>=3.9.0
unidecode>=1.3.8