Improve Cinemax removal regex in fuzzy matcher

- Updated regex from '\bCinemax\s+' to '\bCinemax\b\s*'
- Now handles edge cases like Cinemax at end of string
- Matches Cinemax as complete word with optional trailing spaces
- Ensures proper matching for channels containing 'max'
This commit is contained in:
Claude
2025-11-06 13:52:45 +00:00
parent 9b71b20293
commit 2d9cf4347c

View File

@@ -179,7 +179,7 @@ class FuzzyMatcher:
# Remove "Cinemax" prefix if requested (for channels containing "max") # Remove "Cinemax" prefix if requested (for channels containing "max")
if remove_cinemax: if remove_cinemax:
name = re.sub(r'\bCinemax\s+', '', name, flags=re.IGNORECASE) name = re.sub(r'\bCinemax\b\s*', '', name, flags=re.IGNORECASE)
# Apply hardcoded ignore patterns only if remove_quality_tags is True # Apply hardcoded ignore patterns only if remove_quality_tags is True
if remove_quality_tags: if remove_quality_tags: