mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
add a get_normal_artist_name function to try and normalize artist name variations
- add a get_artist_lists function to group artist name variants into a list
- add a get_normalized_artists function to return normalized artist objects
- use the above functions in:
- searching artists
- album artists
- playlist artists
This commit is contained in:
@@ -11,7 +11,7 @@ from app import exceptions
|
||||
from app import instances
|
||||
from app import models
|
||||
from app import settings
|
||||
from app.helpers import Get
|
||||
from app.helpers import Get, get_normalized_artists
|
||||
from app.lib import trackslib
|
||||
from app.logger import get_logger
|
||||
from PIL import Image
|
||||
@@ -153,8 +153,5 @@ class GetPlaylistArtists:
|
||||
def __call__(self):
|
||||
artists = set()
|
||||
|
||||
for t in self.tracks:
|
||||
for a in t.artists:
|
||||
artists.add(a)
|
||||
|
||||
return [models.Artist(a) for a in artists]
|
||||
artists = [a for t in self.tracks for a in t.artists]
|
||||
return get_normalized_artists(artists)
|
||||
|
||||
Reference in New Issue
Block a user