Show all album artists on cards (#6929)

* Remove indexing and accept a full array of albumartists into the function

* removing console.debug

* Use Array.isArray for array type check

* Fix missing paren

---------

Co-authored-by: greergoodman6@gmail.com <ggoodman@DESKTOP-R652T9J.localdomain>
Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
JohnCaveson
2025-10-18 02:56:42 -04:00
committed by GitHub
parent 1dc435986c
commit 4f9a105921
2 changed files with 9 additions and 1 deletions

View File

@@ -577,7 +577,7 @@ function getCardFooterText(item, apiClient, options, footerClass, progressHtml,
if (flags.isOuterFooter && item.AlbumArtists?.length) {
item.AlbumArtists[0].Type = 'MusicArtist';
item.AlbumArtists[0].IsFolder = true;
lines.push(getTextActionButton(item.AlbumArtists[0], null, serverId));
lines.push(getTextActionButton(item.AlbumArtists, null, serverId));
} else {
lines.push(escapeHtml(isUsingLiveTvNaming(item.Type) ? item.Name : (item.SeriesName || item.Series || item.Album || item.AlbumArtist || '')));
}

View File

@@ -52,6 +52,14 @@ export function getDisplayName(item, options = {}) {
}
}
if (Array.isArray(item)) {
if (item.length > 1) {
return item.map(i => getDisplayName(i, options)).join(' / ');
} else if (item.length === 1) {
return item[0].Name;
}
}
return name;
}