« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/album.js7
-rw-r--r--src/data/things/track.js7
2 files changed, 14 insertions, 0 deletions
diff --git a/src/data/things/album.js b/src/data/things/album.js
index 3f3f195a..303c64b6 100644
--- a/src/data/things/album.js
+++ b/src/data/things/album.js
@@ -150,6 +150,8 @@ export class Album extends Thing {
       dimensions(),
     ],
 
+    trackDimensions: dimensions(),
+
     bannerDimensions: [
       exitWithoutContribs({contribs: 'bannerArtistContribs'}),
       dimensions(),
@@ -409,6 +411,11 @@ export class Album extends Thing {
         transform: parseDimensions,
       },
 
+      'Default Track Dimensions': {
+        property: 'trackDimensions',
+        transform: parseDimensions,
+      },
+
       'Wallpaper Artists': {
         property: 'wallpaperArtistContribs',
         transform: parseContributors,
diff --git a/src/data/things/track.js b/src/data/things/track.js
index 408f18fb..7934daa6 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -197,6 +197,13 @@ export class Track extends Thing {
 
     coverArtDimensions: [
       exitWithoutUniqueCoverArt(),
+
+      withPropertyFromAlbum({
+        property: input.value('trackDimensions'),
+      }),
+
+      exposeDependencyOrContinue({dependency: '#album.trackDimensions'}),
+
       dimensions(),
     ],