« get me outta code hell

data: Track: stub demo Thing.reverseSpecs - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/track.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-01-11 14:14:37 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-01-11 14:14:37 -0400
commitb43833d7afd44b15d75a230be6a63299c3b21317 (patch)
treeda8bdf5cc279ac7f5cf3684dd7af3eb133af4507 /src/data/things/track.js
parent95cd0873ca80f05acb4100ebe08bc43e8107a429 (diff)
data: Track: stub demo Thing.reverseSpecs
Diffstat (limited to 'src/data/things/track.js')
-rw-r--r--src/data/things/track.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js
index 4662be89..5234c568 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -653,6 +653,22 @@ export class Track extends Thing {
     },
   };
 
+  static [Thing.reverseSpecs] = {
+    tracksWhichReference: {
+      bindTo: 'trackData',
+
+      referencing: track => [track],
+      referenced: track => track.sampledTracks,
+    },
+
+    tracksWhichSample: {
+      bindTo: 'trackData',
+
+      referencing: track => [track],
+      referenced: track => track.sampledTracks,
+    },
+  };
+
   // Track YAML loading is handled in album.js.
   static [Thing.getYamlLoadingSpec] = null;