mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-25 01:13:44 +03:00
fixed track name
This commit is contained in:
parent
b76a40aa02
commit
d3b1fe5fa1
|
@ -56,11 +56,13 @@ def load_track(
|
||||||
os.remove(search_info["album_image"])
|
os.remove(search_info["album_image"])
|
||||||
if "title" in search_info:
|
if "title" in search_info:
|
||||||
title = re.sub(r"\W+", "", search_info["title"]).lower()
|
title = re.sub(r"\W+", "", search_info["title"]).lower()
|
||||||
name_clean = re.sub(r"\W+", "", name).lower()
|
name_clean = re.sub(r"\W+", "", orig_name).lower()
|
||||||
|
|
||||||
# Check if title is in name
|
# Check if title is in name
|
||||||
if title in name_clean:
|
if title in name_clean:
|
||||||
name = search_info["title"]
|
name = search_info["title"]
|
||||||
|
elif name:
|
||||||
|
name = name
|
||||||
else:
|
else:
|
||||||
name = process_track_name(" ".join(p_name.strip().split("-")))
|
name = process_track_name(" ".join(p_name.strip().split("-")))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user