« get me outta code hell

content: generateTrackCoverArtwork: use album dimensions - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-13 15:04:11 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-04-13 15:47:34 -0300
commit2143d55665f1899375b99c208745cf8c62c782e0 (patch)
tree59fa70cf889ff83e9037b8dbc5d5c118def0ff03 /src/content
parent4f4fb3139a166d44f5a2f1a034ee460ed70c9d6f (diff)
content: generateTrackCoverArtwork: use album dimensions
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateTrackCoverArtwork.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/content/dependencies/generateTrackCoverArtwork.js b/src/content/dependencies/generateTrackCoverArtwork.js
index 6c056c9a..a241eaf2 100644
--- a/src/content/dependencies/generateTrackCoverArtwork.js
+++ b/src/content/dependencies/generateTrackCoverArtwork.js
@@ -17,12 +17,18 @@ export default {
 
     color:
       track.color,
+
+    dimensions:
+      (track.hasUniqueCoverArt
+        ? track.coverArtDimensions
+        : track.album.coverArtDimensions),
   }),
 
   generate: (data, relations) =>
     relations.coverArtwork.slots({
       path: data.path,
       color: data.color,
+      dimensions: data.dimensions,
     }),
 };