From 2b6b0cb38b10e1f4eb322a854d96d719c99229e4 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Tue, 3 Feb 2026 23:58:31 -0800 Subject: [PATCH] fix artist favorite songs (subsonic) --- src/renderer/api/subsonic/subsonic-controller.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/renderer/api/subsonic/subsonic-controller.ts b/src/renderer/api/subsonic/subsonic-controller.ts index 10e81bc55..8caa00416 100644 --- a/src/renderer/api/subsonic/subsonic-controller.ts +++ b/src/renderer/api/subsonic/subsonic-controller.ts @@ -1361,7 +1361,7 @@ export const SubsonicController: InternalControllerEndpoint = { throw new Error('Failed to get song list'); } - const allResults = + let allResults = (res.body.starred?.song || []).map((song) => ssNormalize.song( song, @@ -1371,6 +1371,15 @@ export const SubsonicController: InternalControllerEndpoint = { ), ) || []; + const filterArtistIds = query.albumArtistIds || query.artistIds; + + if (filterArtistIds?.length) { + const idSet = new Set(filterArtistIds); + allResults = allResults.filter((song) => + song.albumArtists?.some((aa) => idSet.has(aa.id)), + ); + } + return sortAndPaginate(allResults, { limit: query.limit, sortBy: query.sortBy,