« get me outta code hell

content: gAIPCommentaryChunkedList: one line per commentary entry - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-02-06 09:59:58 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-02-06 09:59:58 -0400
commita51a129626653d6376d3afb1404e3bbc84ee2cfd (patch)
tree51ae5dfa7c87781e116df4cc63aa1b5070e053b5 /src/content/dependencies
parentc876fa2573d877f60198b24259d6908a1e775239 (diff)
content: gAIPCommentaryChunkedList: one line per commentary entry
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js b/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js
index 2892152e..41cb3017 100644
--- a/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js
+++ b/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js
@@ -19,10 +19,13 @@ export default {
 
   query(artist) {
     const processEntries = (things, details) =>
-      things.map(thing => ({
-        thing,
-        entry: details(thing),
-      }));
+      things.flatMap(thing =>
+        thing.commentary
+          .filter(entry => entry.artists.includes(artist))
+          .map(entry => ({
+            thing,
+            entry: details(thing, entry),
+          })));
 
     const albumEntries =
       processEntries(