subsonic-api: fallback to AlbumArtistId when child does not have ArtistId

This commit is contained in:
Eivind Siqveland Larsen 2024-09-22 13:44:39 +02:00 committed by Eivind Siqveland Larsen
parent 32d2d7c15b
commit f0417bd9e8

View File

@ -156,6 +156,9 @@ func childFromMediaFile(ctx context.Context, mf model.MediaFile) responses.Child
child.Created = &mf.CreatedAt
child.AlbumId = mf.AlbumID
child.ArtistId = mf.ArtistID
if child.ArtistId == "" {
child.ArtistId = mf.AlbumArtistID
}
child.Type = "music"
child.PlayCount = mf.PlayCount
if mf.PlayCount > 0 {