« 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/track.js24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js
index d9254196..57d2ed20 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -67,6 +67,7 @@ import {
   withOriginalRelease,
   withOtherReleases,
   withPropertyFromAlbum,
+  withTrackArtDate,
 } from '#composite/things/track';
 
 export class Track extends Thing {
@@ -149,27 +150,14 @@ export class Track extends Thing {
       }),
     ],
 
-    // Date of cover art release. Like coverArtFileExtension, this represents
-    // only the track's own unique cover artwork, if any. This exposes only as
-    // the track's own coverArtDate or its album's trackArtDate, so if neither
-    // is specified, this value is null.
     coverArtDate: [
-      withHasUniqueCoverArt(),
-
-      exitWithoutDependency({
-        dependency: '#hasUniqueCoverArt',
-        mode: input.value('falsy'),
-      }),
-
-      exposeUpdateValueOrContinue({
-        validate: input.value(isDate),
-      }),
-
-      withPropertyFromAlbum({
-        property: input.value('trackArtDate'),
+      withTrackArtDate({
+        from: input.updateValue({
+          validate: isDate,
+        }),
       }),
 
-      exposeDependency({dependency: '#album.trackArtDate'}),
+      exposeDependency({dependency: '#trackArtDate'}),
     ],
 
     coverArtDimensions: [