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:
@@ -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 || '')));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user