Spaces:
Running
on
Zero
Running
on
Zero
fix: issue with the title
Browse files
app.py
CHANGED
@@ -55,14 +55,12 @@ def standardize_title(input_title):
|
|
55 |
Returns:
|
56 |
str: Standardized title in "Artist - Title" format
|
57 |
"""
|
58 |
-
|
59 |
-
title_cleaned = input_title.replace("utomp3.com", "").replace("_320kbps", "")
|
60 |
|
61 |
# Remove content within parentheses or brackets
|
62 |
title_cleaned = re.sub(r"[\(\[].*?[\)\]]", "", input_title)
|
63 |
|
64 |
# Remove unnecessary words
|
65 |
-
unnecessary_words = ["official", "video", "hd", "4k", "lyrics", "music", "audio", "visualizer", "remix", ""
|
66 |
title_cleaned = re.sub(r"\b(?:{})\b".format("|".join(unnecessary_words)), "", title_cleaned, flags=re.IGNORECASE)
|
67 |
|
68 |
# Split title into parts
|
|
|
55 |
Returns:
|
56 |
str: Standardized title in "Artist - Title" format
|
57 |
"""
|
|
|
|
|
58 |
|
59 |
# Remove content within parentheses or brackets
|
60 |
title_cleaned = re.sub(r"[\(\[].*?[\)\]]", "", input_title)
|
61 |
|
62 |
# Remove unnecessary words
|
63 |
+
unnecessary_words = ["official", "video", "hd", "4k", "lyrics", "music", "audio", "visualizer", "remix", ""]
|
64 |
title_cleaned = re.sub(r"\b(?:{})\b".format("|".join(unnecessary_words)), "", title_cleaned, flags=re.IGNORECASE)
|
65 |
|
66 |
# Split title into parts
|