« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateGroupInfoPageAlbumsListBySeries.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateGroupInfoPageAlbumsListBySeries.js')
-rw-r--r--src/content/dependencies/generateGroupInfoPageAlbumsListBySeries.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/content/dependencies/generateGroupInfoPageAlbumsListBySeries.js b/src/content/dependencies/generateGroupInfoPageAlbumsListBySeries.js
index 2e439897..463522ea 100644
--- a/src/content/dependencies/generateGroupInfoPageAlbumsListBySeries.js
+++ b/src/content/dependencies/generateGroupInfoPageAlbumsListBySeries.js
@@ -26,6 +26,10 @@ export default {
     seriesNames:
       group.serieses
         .map(series => series.name),
+
+    seriesShowAlbumArtists:
+      group.serieses
+        .map(series => series.showAlbumArtists),
   }),
 
   generate: (data, relations, {html, language}) =>
@@ -38,9 +42,15 @@ export default {
 
         stitchArrays({
           name: data.seriesNames,
+          showAlbumArtists: data.seriesShowAlbumArtists,
           heading: relations.seriesHeadings,
           items: relations.seriesItems,
-        }).map(({heading, name, items}) =>
+        }).map(({
+            name,
+            showAlbumArtists,
+            heading,
+            items,
+          }) =>
             html.tags([
               heading.slots({
                 tag: 'dt',
@@ -52,6 +62,10 @@ export default {
 
               html.tag('dd',
                 html.tag('ul',
-                  items)),
+                  items.map(item =>
+                    item.slots({
+                      accentMode:
+                        (showAlbumArtists ? 'artists' : null),
+                    })))),
             ])))),
 };