« get me outta code hell

data: Track: chop withOtherReleases - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-11-25 16:47:06 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-11-25 16:47:06 -0400
commit23b29313e227ff561627143c5c0108525f5d8df0 (patch)
tree91241ceb8059f41dc200858a796c7f827dd504dd /src/data
parent7cf701e6e44dbbd15694542969b48b6707ab0c24 (diff)
data: Track: chop withOtherReleases
Diffstat (limited to 'src/data')
-rw-r--r--src/data/composite/things/track/index.js1
-rw-r--r--src/data/composite/things/track/withOtherReleases.js23
-rw-r--r--src/data/things/track.js11
3 files changed, 8 insertions, 27 deletions
diff --git a/src/data/composite/things/track/index.js b/src/data/composite/things/track/index.js
index 17e4aeff..6b11089b 100644
--- a/src/data/composite/things/track/index.js
+++ b/src/data/composite/things/track/index.js
@@ -3,7 +3,6 @@ export {default as exitWithoutUniqueCoverArt} from './exitWithoutUniqueCoverArt.
 export {default as inheritContributionListFromMainRelease} from './inheritContributionListFromMainRelease.js';
 export {default as inheritFromMainRelease} from './inheritFromMainRelease.js';
 export {default as withDirectorySuffix} from './withDirectorySuffix.js';
-export {default as withOtherReleases} from './withOtherReleases.js';
 export {default as withPropertyFromAlbum} from './withPropertyFromAlbum.js';
 export {default as withPropertyFromMainRelease} from './withPropertyFromMainRelease.js';
 export {default as withSuffixDirectoryFromAlbum} from './withSuffixDirectoryFromAlbum.js';
diff --git a/src/data/composite/things/track/withOtherReleases.js b/src/data/composite/things/track/withOtherReleases.js
deleted file mode 100644
index ccf57deb..00000000
--- a/src/data/composite/things/track/withOtherReleases.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// Gets all releases of the current track *except* this track itself;
-// in other words, all other releases of the current track.
-
-import {input, templateCompositeFrom} from '#composite';
-
-export default templateCompositeFrom({
-  annotation: `withOtherReleases`,
-
-  outputs: ['#otherReleases'],
-
-  steps: () => [
-    {
-      dependencies: [input.myself(), 'allReleases'],
-      compute: (continuation, {
-        [input.myself()]: thisTrack,
-        ['allReleases']: allReleases,
-      }) => continuation({
-        ['#otherReleases']:
-          allReleases.filter(track => track !== thisTrack),
-      }),
-    },
-  ],
-});
diff --git a/src/data/things/track.js b/src/data/things/track.js
index a8c4f8d9..401543f3 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -90,7 +90,6 @@ import {
   inheritContributionListFromMainRelease,
   inheritFromMainRelease,
   withDirectorySuffix,
-  withOtherReleases,
   withPropertyFromAlbum,
   withSuffixDirectoryFromAlbum,
   withTrackNumber,
@@ -991,8 +990,14 @@ export class Track extends Thing {
     ],
 
     otherReleases: [
-      withOtherReleases(),
-      exposeDependency({dependency: '#otherReleases'}),
+      {
+        dependencies: [input.myself(), 'allReleases'],
+        compute: ({
+          [input.myself()]: thisTrack,
+          ['allReleases']: allReleases,
+        }) =>
+          allReleases.filter(track => track !== thisTrack),
+      },
     ],
 
     commentaryFromMainRelease: [