feat: improved cleanup of song title
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Hellow
2024-04-26 00:23:04 +02:00
parent 90a352153d
commit a015b8918e
3 changed files with 12 additions and 4 deletions

View File

@@ -93,7 +93,7 @@ def clean_song_title(raw_song_title: str, artist_name: Optional[str] = None) ->
break
substring = raw_song_title[open_bracket_index + 1:close_bracket_index]
if any(disallowed_substring in substring for disallowed_substring in DISALLOWED_SUBSTRING_IN_BRACKETS):
if any(disallowed_substring in substring.lower() for disallowed_substring in DISALLOWED_SUBSTRING_IN_BRACKETS):
raw_song_title = raw_song_title[:open_bracket_index] + raw_song_title[close_bracket_index + 1:]
else:
start = close_bracket_index + 1