mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 05:09:56 +02:00
Adds support for artist's cover art in subsonic API (#1528)
This commit is contained in:
parent
89b3789c76
commit
44ac313617
4 changed files with 46 additions and 9 deletions
|
@ -49,6 +49,7 @@ def get_artist_data(artist_values):
|
|||
"id": artist_values["id"],
|
||||
"name": artist_values["name"],
|
||||
"albumCount": artist_values["_albums_count"],
|
||||
"coverArt": "ar-{}".format(artist_values["id"]),
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,6 +83,8 @@ class GetArtistSerializer(serializers.Serializer):
|
|||
"albumCount": len(albums),
|
||||
"album": [],
|
||||
}
|
||||
if artist.attachment_cover_id:
|
||||
payload["coverArt"] = "ar-{}".format(artist.id)
|
||||
for album in albums:
|
||||
album_data = {
|
||||
"id": album.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue