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,