From 4362324b40da9daa54c9c6c3a821b0cccaec71a0 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 5 Aug 2024 12:43:39 -0300 Subject: data, test: TrackSection.tracks: use direct links --- src/data/things/album.js | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src/data/things') diff --git a/src/data/things/album.js b/src/data/things/album.js index f1a7df3d..82f155b4 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -440,15 +440,8 @@ export class Album extends Thing { } currentTrackSection.tracks = - currentTrackSectionTracks - .map(track => Thing.getReference(track)); - - currentTrackSection.ownTrackData = currentTrackSectionTracks; - currentTrackSection.ownAlbumData = - [album]; - trackSections.push(currentTrackSection); trackSectionData.push(currentTrackSection); }; @@ -521,22 +514,16 @@ export class TrackSection extends Thing { exposeDependency({dependency: '#album'}), ], - tracks: referenceList({ + tracks: thingList({ class: input.value(Track), - data: 'ownTrackData', - find: input.value(find.track), }), // Update only - ownAlbumData: wikiData({ + albumData: wikiData({ class: input.value(Album), }), - ownTrackData: wikiData({ - class: input.value(Track), - }), - // Expose only directory: [ @@ -655,8 +642,6 @@ export class TrackSection extends Thing { length = this.tracks.length; } catch {} - album ??= CacheableObject.getUpdateValue(this, 'ownAlbumData')?.[0]; - if (album) { const albumName = album.name; const albumIndex = album.trackSections.indexOf(this); -- cgit 1.3.0-6-gf8a5