« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data/things/track.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js
index 697dad44..cc49fc24 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -13,6 +13,7 @@ import {
   parseAdditionalNames,
   parseContributors,
   parseDate,
+  parseDimensions,
   parseDuration,
 } from '#yaml';
 
@@ -34,6 +35,7 @@ import {
   commentatorArtists,
   contentString,
   contributionList,
+  dimensions,
   directory,
   duration,
   flag,
@@ -158,6 +160,11 @@ export class Track extends Thing {
       exposeDependency({dependency: '#album.trackArtDate'}),
     ],
 
+    coverArtDimensions: [
+      exitWithoutUniqueCoverArt(),
+      dimensions(),
+    ],
+
     commentary: commentary(),
 
     lyrics: [
@@ -389,6 +396,11 @@ export class Track extends Thing {
 
       'Cover Art File Extension': {property: 'coverArtFileExtension'},
 
+      'Cover Art Dimensions': {
+        property: 'coverArtDimensions',
+        transform: parseDimensions,
+      },
+
       'Has Cover Art': {
         property: 'disableUniqueCoverArt',
         transform: value =>