diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index 99dbd8d2ea..584452e6bd 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -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('' + escapeHtml(artist.Name) + ''); } - return html.join(' / '); + let fullHtml = html.join(' / '); + + if (numberOfArtists > 10) { + fullHtml = globalize.translate('AndOtherArtists', fullHtml, numberOfArtists - 10); + } + + return fullHtml; } /** diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 12023468eb..56b6c4f673 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -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.", "AnyLanguage": "Any Language", "Anytime": "Anytime", "ApiKeysCaption": "List of the currently enabled API keys",