From 4196514fdf069e52ffe87a7151d5c2d36d3cad70 Mon Sep 17 00:00:00 2001 From: sel10ut <45976019+sel10ut@users.noreply.github.com> Date: Thu, 24 Oct 2024 02:47:05 +0300 Subject: [PATCH] fix(jellyfin): return "Appears On" section to artist page Exclude 'AlbumArtistIds' when querying "Appears On" items, which, if put together with 'ContributingArtistIds', returns an empty list. --- src/renderer/api/jellyfin/jellyfin-controller.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/renderer/api/jellyfin/jellyfin-controller.ts b/src/renderer/api/jellyfin/jellyfin-controller.ts index bead6c2a..8621554e 100644 --- a/src/renderer/api/jellyfin/jellyfin-controller.ts +++ b/src/renderer/api/jellyfin/jellyfin-controller.ts @@ -293,10 +293,14 @@ export const JellyfinController: ControllerEndpoint = { userId: apiClientProps.server?.userId, }, query: { - AlbumArtistIds: query.artistIds - ? formatCommaDelimitedString(query.artistIds) - : undefined, - ContributingArtistIds: query.compilation ? query.artistIds?.[0] : undefined, + ...(!query.compilation && + query.artistIds && { + AlbumArtistIds: formatCommaDelimitedString(query.artistIds), + }), + ...(query.compilation && + query.artistIds && { + ContributingArtistIds: query.artistIds[0], + }), GenreIds: query.genres ? query.genres.join(',') : undefined, IncludeItemTypes: 'MusicAlbum', IsFavorite: query.favorite,