Verified Commit 5715773f authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Fix #765: Include disc number in Subsonic responses

parent 12113c6e
......@@ -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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment