From 31a15f783f915811990cefb90fe1661293c49f3d Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 6 Aug 2023 20:29:48 -0300 Subject: content: generateArtistGalleryPage: show co-illustrators --- src/content/dependencies/generateArtistGalleryPage.js | 17 +++++++++++++++++ src/strings-default.json | 1 + 2 files changed, 18 insertions(+) diff --git a/src/content/dependencies/generateArtistGalleryPage.js b/src/content/dependencies/generateArtistGalleryPage.js index 98fa2dc..b117290 100644 --- a/src/content/dependencies/generateArtistGalleryPage.js +++ b/src/content/dependencies/generateArtistGalleryPage.js @@ -60,6 +60,14 @@ export default { ? ['media.trackCover', thing.album.directory, thing.directory, thing.coverArtFileExtension] : ['media.albumCover', thing.directory, thing.coverArtFileExtension])); + data.otherCoverArtists = + query.things.map(thing => + (thing.coverArtistContribs.length > 1 + ? thing.coverArtistContribs + .filter(({who}) => who !== artist) + .map(({who}) => who.name) + : null)); + return data; }, @@ -87,12 +95,21 @@ export default { .slots({ links: relations.links, names: data.names, + images: stitchArrays({ image: relations.images, path: data.paths, }).map(({image, path}) => image.slot('path', path)), + + info: + data.otherCoverArtists.map(names => + (names === null + ? null + : language.$('misc.albumGrid.details.otherCoverArtists', { + artists: language.formatUnitList(names), + }))), }), ], diff --git a/src/strings-default.json b/src/strings-default.json index a37c8d5..ec174a2 100644 --- a/src/strings-default.json +++ b/src/strings-default.json @@ -233,6 +233,7 @@ "misc.contentWarnings.reveal": "click to show", "misc.albumGrid.details": "({TRACKS}, {TIME})", "misc.albumGrid.details.coverArtists": "(Illust. {ARTISTS})", + "misc.albumGrid.details.otherCoverArtists": "(With {ARTISTS})", "misc.albumGrid.noCoverArt": "{ALBUM}", "misc.albumGalleryGrid.noCoverArt": "{NAME}", "misc.uiLanguage": "UI Language: {LANGUAGES}", -- cgit 1.3.0-6-gf8a5