From f0417bd9e83c65a948df3d22e757513ea8c76045 Mon Sep 17 00:00:00 2001 From: Eivind Siqveland Larsen Date: Sun, 22 Sep 2024 13:44:39 +0200 Subject: [PATCH] subsonic-api: fallback to AlbumArtistId when child does not have ArtistId --- server/subsonic/helpers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/subsonic/helpers.go b/server/subsonic/helpers.go index 7afbbbfea..14d01f807 100644 --- a/server/subsonic/helpers.go +++ b/server/subsonic/helpers.go @@ -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 {