« get me outta code hell

data: Track.coverArtDimensions - 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:
author(quasar) nebula <qznebula@protonmail.com>2024-04-13 15:03:54 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-04-13 15:47:34 -0300
commit4f4fb3139a166d44f5a2f1a034ee460ed70c9d6f (patch)
tree7e440cce8a5eeef752d50699360120fd570ec385 /src/data/things
parent67840507a46925041ca192d9c429c512210c9113 (diff)
data: Track.coverArtDimensions
Diffstat (limited to 'src/data/things')
-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 =>