mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-07 11:45:35 +00:00
prevent different cased featured artist names.
remove "/" as artist separator
This commit is contained in:
parent
af4221e0c7
commit
5b71b95d66
@ -59,9 +59,10 @@ class Track:
|
||||
def __post_init__(self):
|
||||
if self.artist is not None:
|
||||
artists = utils.split_artists(self.artist)
|
||||
|
||||
featured = utils.extract_featured_artists_from_title(self.title)
|
||||
artists.extend(featured)
|
||||
artists = set(artists)
|
||||
original_lower = "-".join([a.lower() for a in artists])
|
||||
artists.extend([a for a in featured if a.lower() not in original_lower])
|
||||
|
||||
self.artist_hashes = [utils.create_hash(a, decode=True) for a in artists]
|
||||
|
||||
|
@ -260,7 +260,7 @@ def is_windows():
|
||||
|
||||
|
||||
def split_artists(src: str):
|
||||
artists = re.split(r"\s*[&,;/]\s*", src)
|
||||
artists = re.split(r"\s*[&,;]\s*", src)
|
||||
return [a.strip() for a in artists]
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user