« 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.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js
index 3db5e183..c2dd7b8f 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -25,6 +25,7 @@ import {
 import {withPropertyFromObject} from '#composite/data';
 
 import {
+  exitWithoutDependency,
   exposeConstant,
   exposeDependency,
   exposeDependencyOrContinue,
@@ -469,6 +470,24 @@ export class Track extends Thing {
       exposeDependency({dependency: '#otherReleases'}),
     ],
 
+    commentaryFromMainRelease: [
+      withMainRelease(),
+
+      exitWithoutDependency({
+        dependency: '#mainRelease',
+        value: input.value([]),
+      }),
+
+      withPropertyFromObject({
+        object: '#mainRelease',
+        property: input.value('commentary'),
+      }),
+
+      exposeDependency({
+        dependency: '#mainRelease.commentary',
+      }),
+    ],
+
     groups: [
       withPropertyFromAlbum({
         property: input.value('groups'),