« get me outta code hell

data: simplify mainRelease matching - 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-01-01 13:48:40 -0400
committer(quasar) nebula <qznebula@protonmail.com>2026-01-01 13:48:40 -0400
commit0c823c9817f960db16e13f52a8c27ef740f24a40 (patch)
treea3f0b2fa2c2ece53cada1545759ae21fd7599a83
parent0e15b509d725dc0ab16f9b7bad050bacb1ec9bf2 (diff)
data: simplify mainRelease matching
-rw-r--r--src/data/things/track.js36
1 files changed, 2 insertions, 34 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js
index f07bba82..298cd6cf 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -225,40 +225,8 @@ export class Track extends Thing {
       }),
 
       exposeDependencyOrContinue('#sameNameSingle'),
-
-      {
-        dependencies: [
-          '#matchingTrack',
-          '#matchingAlbum',
-        ],
-
-        compute: (continuation, {
-          ['#matchingTrack']: matchingTrack,
-          ['#matchingAlbum']: matchingAlbum,
-        }) =>
-          (matchingTrack && matchingAlbum
-            ? continuation()
-         : matchingTrack ?? matchingAlbum
-            ? matchingTrack ?? matchingAlbum
-            : null),
-      },
-
-      withPropertyFromObject( '#matchingAlbum', V('tracks')),
-
-      {
-        dependencies: [
-          '#matchingAlbum.tracks',
-          '#matchingTrack',
-        ],
-
-        compute: ({
-          ['#matchingAlbum.tracks']: matchingAlbumTracks,
-          ['#matchingTrack']: matchingTrack,
-        }) =>
-          (matchingAlbumTracks.includes(matchingTrack)
-            ? matchingTrack
-            : null),
-      },
+      exposeDependencyOrContinue('#matchingAlbum'),
+      exposeDependency('#matchingTrack'),
     ],
 
     bandcampTrackIdentifier: simpleString(),