« 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/generateAlbumCoverArtwork.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateAlbumCoverArtwork.js')
-rw-r--r--src/content/dependencies/generateAlbumCoverArtwork.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/content/dependencies/generateAlbumCoverArtwork.js b/src/content/dependencies/generateAlbumCoverArtwork.js
index cbec930e..ce8cde21 100644
--- a/src/content/dependencies/generateAlbumCoverArtwork.js
+++ b/src/content/dependencies/generateAlbumCoverArtwork.js
@@ -1,12 +1,22 @@
 export default {
   contentDependencies: ['generateCoverArtwork'],
 
-  relations: (relation, album) =>
-    ({coverArtwork: relation('generateCoverArtwork', album.artTags)}),
+  relations: (relation, album) => ({
+    coverArtwork:
+      relation('generateCoverArtwork', album.artTags),
+  }),
 
-  data: (album) =>
-    ({path: ['media.albumCover', album.directory, album.coverArtFileExtension]}),
+  data: (album) => ({
+    path:
+      ['media.albumCover', album.directory, album.coverArtFileExtension],
+
+    color:
+      album.color,
+  }),
 
   generate: (data, relations) =>
-    relations.coverArtwork.slot('path', data.path),
+    relations.coverArtwork.slots({
+      path: data.path,
+      color: data.color,
+    }),
 };