« get me outta code hell

data: Track.showInReferenceLists - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-05-11 19:57:49 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-05-11 19:57:49 -0300
commitae238fcd365f6b668828768e7bae6640414a4a21 (patch)
tree4a5245d36b03b1322a9fd4709083e106532893b8
parentbbddc3020b0a9e2353d27fca15ec922a97198c13 (diff)
data: Track.showInReferenceLists
-rw-r--r--src/data/things/Track.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/data/things/Track.js b/src/data/things/Track.js
index 79877edb..0ebef43c 100644
--- a/src/data/things/Track.js
+++ b/src/data/things/Track.js
@@ -339,6 +339,8 @@ export class Track extends Thing {
       exposeDependency('#trackSection.countTracksInArtistTotals'),
     ],
 
+    showInReferenceLists: flag(V(true)),
+
     disableUniqueCoverArt: flag(V(false)),
     disableDate: flag(V(false)),
 
@@ -998,6 +1000,7 @@ export class Track extends Thing {
       // General configuration
 
       'Count In Artist Totals': {property: 'countInArtistTotals'},
+      'Show In Reference Lists': {property: 'showInReferenceLists'},
 
       'Has Cover Art': {
         property: 'disableUniqueCoverArt',
@@ -1286,14 +1289,24 @@ export class Track extends Thing {
     tracksWhichReference: {
       bindTo: 'trackData',
 
-      referencing: track => track.isMainRelease ? [track] : [],
+      referencing: track =>
+        (track.isMainRelease &&
+         track.showInReferenceLists
+          ? [track]
+          : []),
+
       referenced: track => track.referencedTracks,
     },
 
     tracksWhichSample: {
       bindTo: 'trackData',
 
-      referencing: track => track.isMainRelease ? [track] : [],
+      referencing: track =>
+        (track.isMainRelease &&
+         track.showInReferenceLists
+          ? [track]
+          : []),
+
       referenced: track => track.sampledTracks,
     },