chore: snapshot current project updates
This commit is contained in:
+4
-7
@@ -65,13 +65,13 @@ def remove_release_groups(text: str) -> str:
|
||||
|
||||
|
||||
def normalize_title(title: str) -> str:
|
||||
"""Normalize a title by cleaning whitespace and standardizing capitalization.
|
||||
"""Normalize a title by cleaning separators and whitespace.
|
||||
|
||||
Args:
|
||||
title: Raw title string
|
||||
|
||||
Returns:
|
||||
Normalized title with proper capitalization and spacing
|
||||
Normalized title with cleaned separators and spacing
|
||||
"""
|
||||
# Replace dots and underscores with spaces
|
||||
title = title.replace('.', ' ').replace('_', ' ')
|
||||
@@ -79,9 +79,6 @@ def normalize_title(title: str) -> str:
|
||||
# Remove extra whitespace
|
||||
title = ' '.join(title.split())
|
||||
|
||||
# Apply title case
|
||||
title = title.title()
|
||||
|
||||
return title.strip()
|
||||
|
||||
|
||||
@@ -193,8 +190,8 @@ def parse_series(
|
||||
# Pattern: SXXEYY or SXXeYY - High confidence
|
||||
# Also handles multi-episode: S01E01-E02, S01E01E02E03, etc.
|
||||
(r'[Ss](\d{1,2})[Ee](\d{1,2})', 0.9),
|
||||
# Pattern: XXxYY - High confidence
|
||||
(r'(\d{1,2})x(\d{1,2})', 0.9),
|
||||
# Pattern: XXxYY - High confidence (boundary-sensitive, avoid resolution substrings)
|
||||
(r'(?<!\d)(\d{1,2})x(\d{1,2})(?!\d)', 0.9),
|
||||
# Pattern: Season X Episode Y - Medium confidence
|
||||
(r'[Ss]eason\s*(\d{1,2})\s*[Ee]pisode\s*(\d{1,2})', 0.7),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user