Skip to content
Snippets Groups Projects
Commit 8ac38ba7 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch '765-disc-number-subsonic' into 'master'

Fix #765: Include disc number in Subsonic responses

See merge request funkwhale/funkwhale!681
parents 12113c6e 5715773f
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,7 @@ def get_track_data(album, track, upload):
"album": album.title,
"artist": album.artist.name,
"track": track.position or 1,
"discNumber": track.disc_number or 1,
"contentType": upload.mimetype,
"suffix": upload.extension or "",
"duration": upload.duration or 0,
......
......@@ -64,7 +64,7 @@ def test_get_artist_serializer(factories):
def test_get_album_serializer(factories):
artist = factories["music.Artist"]()
album = factories["music.Album"](artist=artist)
track = factories["music.Track"](album=album)
track = factories["music.Track"](album=album, disc_number=42)
upload = factories["music.Upload"](track=track, bitrate=42000, duration=43, size=44)
expected = {
......@@ -85,6 +85,7 @@ def test_get_album_serializer(factories):
"album": album.title,
"artist": artist.name,
"track": track.position,
"discNumber": track.disc_number,
"year": track.album.release_date.year,
"contentType": upload.mimetype,
"suffix": upload.extension or "",
......
Include disc number in Subsonic responses (#765)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment