« get me outta code hell

data, content: Track.commentaryFromMainRelease - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-07-12 17:06:47 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-07-12 17:06:47 -0300
commitc6bdd7a09b3968de3b0ebb19a129d081efc7c09a (patch)
treee1fc614d82b6048b90d683a27f144451b6f636ed /src/data
parent4fee9a2fd9aa9ae2e5deb6fa8cd9f60d71add003 (diff)
data, content: Track.commentaryFromMainRelease
Diffstat (limited to 'src/data')
-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'),