From 61d7e7c390e1351f6eb44aa42b61d04fa44318a8 Mon Sep 17 00:00:00 2001 From: sel10ut <45976019+sel10ut@users.noreply.github.com> Date: Thu, 31 Oct 2024 21:33:10 +0300 Subject: [PATCH] fix(jellyfin): return "Appears On" section to artist page (#812) 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,