From 1ed038f459ed9e4ffeb91149a0067349d6e16641 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 7 Apr 2025 06:59:22 -0300 Subject: data: remove TrackSection.startIndex --- src/data/things/album.js | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'src') diff --git a/src/data/things/album.js b/src/data/things/album.js index 762e7d48..5aba75f7 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -745,44 +745,6 @@ export class TrackSection extends Thing { exposeDependency({dependency: '#continueCountingFrom'}), ], - - startIndex: [ - withAlbum(), - - withPropertyFromObject({ - object: '#album', - property: input.value('trackSections'), - }), - - { - dependencies: ['#album.trackSections', input.myself()], - compute: (continuation, { - ['#album.trackSections']: trackSections, - [input.myself()]: myself, - }) => continuation({ - ['#index']: - trackSections.indexOf(myself), - }), - }, - - exitWithoutDependency({ - dependency: '#index', - mode: input.value('index'), - value: input.value(0), - }), - - { - dependencies: ['#album.trackSections', '#index'], - compute: ({ - ['#album.trackSections']: trackSections, - ['#index']: index, - }) => - accumulateSum( - trackSections - .slice(0, index) - .map(section => section.tracks.length)), - }, - ], }); static [Thing.findSpecs] = { -- cgit 1.3.0-6-gf8a5