diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index 5d9c8643de..72412615be 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -1171,9 +1171,9 @@ function renderMoreFromArtist(view, item, apiClient) { }; if (item.Type === 'MusicArtist') { - query.AlbumArtistIds = item.Id; + query.ContributingArtistIds = item.Id; } else { - query.AlbumArtistIds = item.AlbumArtists[0].Id; + query.ContributingArtistIds = item.AlbumArtists.map(artist => artist.Id).join(','); } apiClient.getItems(apiClient.getCurrentUserId(), query).then(function (result) { diff --git a/src/scripts/itembynamedetailpage.js b/src/scripts/itembynamedetailpage.js index a7241394c1..0c3bef5c81 100644 --- a/src/scripts/itembynamedetailpage.js +++ b/src/scripts/itembynamedetailpage.js @@ -265,6 +265,12 @@ function renderSection(page, item, element, type) { function loadItems(element, item, type, query, listOptions) { query = getQuery(query, item); getItemsFunction(query, item)(query.StartIndex, query.Limit, query.Fields).then(function (result) { + // If results are empty, hide the section + if (!result.Items?.length) { + element.classList.add('hide'); + return; + } + let html = ''; if (query.Limit && result.TotalRecordCount > query.Limit) { @@ -327,7 +333,7 @@ function addCurrentItemToQuery(query, item) { } else if (item.Type === 'Studio') { query.StudioIds = item.Id; } else if (item.Type === 'MusicArtist') { - query.ArtistIds = item.Id; + query.AlbumArtistIds = item.Id; } }