Updates subsonic album serializer test
This commit is contained in:
parent
84e4b9b029
commit
60cef41af5
|
@ -183,7 +183,7 @@ def test_get_album_serializer(factories):
|
||||||
"created": serializers.to_subsonic_date(album.creation_date),
|
"created": serializers.to_subsonic_date(album.creation_date),
|
||||||
"year": album.release_date.year,
|
"year": album.release_date.year,
|
||||||
"coverArt": "al-{}".format(album.id),
|
"coverArt": "al-{}".format(album.id),
|
||||||
"genre": ", ".join([ti.tag.name for ti in album.tagged_items.all()]),
|
"genre": [ti.tag.name for ti in album.tagged_items.all()][0] or "",
|
||||||
"duration": album.tracks.aggregate(d=Sum("uploads__duration"))["d"] or 0,
|
"duration": album.tracks.aggregate(d=Sum("uploads__duration"))["d"] or 0,
|
||||||
"playCount": album.tracks.aggregate(c=Sum("downloads_count"))["c"] or 0,
|
"playCount": album.tracks.aggregate(c=Sum("downloads_count"))["c"] or 0,
|
||||||
"song": [
|
"song": [
|
||||||
|
|
Loading…
Reference in New Issue