fix/bandcamp #12
@ -56,6 +56,7 @@ def fit_to_file_system(string: Union[str, Path]) -> Union[str, Path]:
|
||||
return fit_string(string)
|
||||
|
||||
|
||||
@lru_cache(maxsize=128)
|
||||
def clean_song_title(raw_song_title: str, artist_name: Optional[str] = None) -> str:
|
||||
"""
|
||||
This function cleans common naming "conventions" for non clean song titles, like the title of youtube videos
|
||||
@ -76,6 +77,9 @@ def clean_song_title(raw_song_title: str, artist_name: Optional[str] = None) ->
|
||||
|
||||
# remove brackets and their content if they contain disallowed substrings
|
||||
for open_bracket, close_bracket in zip(OPEN_BRACKETS, CLOSE_BRACKETS):
|
||||
if open_bracket not in raw_song_title or close_bracket not in raw_song_title:
|
||||
continue
|
||||
|
||||
start = 0
|
||||
|
||||
while True:
|
||||
|
Loading…
Reference in New Issue
Block a user