« 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.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js
index 0ac6aabd..408f18fb 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -628,6 +628,19 @@ export class Track extends Thing {
           ? []
           : [track.name]),
     },
+
+    trackWithArtwork: {
+      referenceTypes: ['track'],
+      bindTo: 'trackData',
+
+      include: track =>
+        track.hasUniqueCoverArt,
+
+      getMatchableNames: track =>
+        (track.alwaysReferenceByDirectory
+          ? []
+          : [track.name]),
+    },
   };
 
   // Track YAML loading is handled in album.js.