Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added artist list concatenation for albums that have over 10 artists #4830

Merged
merged 8 commits into from
Aug 15, 2024
16 changes: 12 additions & 4 deletions src/controllers/itemDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,17 +386,25 @@ function reloadUserDataButtons(page, item) {

function getArtistLinksHtml(artists, serverId, context) {
const html = [];
const numberOfArtists = artists.length;

for (const artist of artists) {
for (let i = 0; i < Math.min(numberOfArtists, 10); i++) {
const artist = artists[i];
const href = appRouter.getRouteUrl(artist, {
context: context,
context,
itemType: 'MusicArtist',
serverId: serverId
serverId
});
html.push('<a style="color:inherit;" class="button-link" is="emby-linkbutton" href="' + href + '">' + escapeHtml(artist.Name) + '</a>');
}

return html.join(' / ');
let fullHtml = html.join(' / ');

if (numberOfArtists > 10) {
fullHtml = globalize.translate('AndOtherArtists', fullHtml, numberOfArtists - 10);
}

return fullHtml;
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"AllowTonemappingHelp": "Tone-mapping can transform the dynamic range of a video from HDR to SDR while maintaining image details and colors, which are very important information for representing the original scene. Currently works only with 10bit HDR10, HLG and DoVi videos. This requires the corresponding GPGPU runtime.",
"AlwaysPlaySubtitles": "Always Play",
"AlwaysPlaySubtitlesHelp": "Subtitles matching the language preference will be loaded regardless of the audio language.",
"AndOtherArtists": "{0} and {1} other artists.",
thornbill marked this conversation as resolved.
Show resolved Hide resolved
"AnyLanguage": "Any Language",
"Anytime": "Anytime",
"ApiKeysCaption": "List of the currently enabled API keys",
Expand Down
Loading