« 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/track.js
diff options
context:
space:
mode:
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;