mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
add "&" character to genre separators
+ handle r&b genre and rock&roll
This commit is contained in:
+11
-1
@@ -216,7 +216,17 @@ def get_artist(artisthash: str):
|
||||
|
||||
artist.is_favorite = favdb.check_is_favorite(artisthash, FavType.artist)
|
||||
|
||||
return {"artist": artist, "tracks": serialize_tracks(tracks[:limit])}
|
||||
genres = set()
|
||||
|
||||
for t in tracks:
|
||||
if t.genre is not None:
|
||||
genres = genres.union(t.genre)
|
||||
|
||||
return {
|
||||
"artist": artist,
|
||||
"tracks": serialize_tracks(tracks[:limit]),
|
||||
"genres": list(genres),
|
||||
}
|
||||
|
||||
|
||||
@api.route("/artist/<artisthash>/albums", methods=["GET"])
|
||||
|
||||
Reference in New Issue
Block a user