From 35ecbf36481393bc833d95aaf645602703f98be6 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 23 Jun 2023 20:57:01 -0300 Subject: generateAlbumGalleryPage: incl. cover artists in grid info --- src/content/dependencies/generateAlbumGalleryPage.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/content') diff --git a/src/content/dependencies/generateAlbumGalleryPage.js b/src/content/dependencies/generateAlbumGalleryPage.js index 71cd477b..b39b4c80 100644 --- a/src/content/dependencies/generateAlbumGalleryPage.js +++ b/src/content/dependencies/generateAlbumGalleryPage.js @@ -60,6 +60,12 @@ export default { data.names = album.tracks.map(track => track.name); + data.coverArtists = + album.tracks.map(track => + (track.hasUniqueCoverArt + ? track.coverArtistContribs.map(({who: artist}) => artist.name) + : null)); + data.paths = album.tracks.map(track => (track.hasUniqueCoverArt @@ -101,6 +107,13 @@ export default { missingSourceContent: language.$('misc.albumGalleryGrid.noCoverArt', {name}), })), + info: + data.coverArtists.map(names => + (names === null + ? null + : language.$('misc.albumGrid.details.coverArtists', { + artists: language.formatUnitList(names), + }))), }), ], -- cgit 1.3.0-6-gf8a5