From c6bdd7a09b3968de3b0ebb19a129d081efc7c09a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 12 Jul 2025 17:06:47 -0300 Subject: data, content: Track.commentaryFromMainRelease --- .../generateTrackArtistCommentarySection.js | 2 +- src/data/things/track.js | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/content/dependencies/generateTrackArtistCommentarySection.js b/src/content/dependencies/generateTrackArtistCommentarySection.js index c7e7f0f8..50565bce 100644 --- a/src/content/dependencies/generateTrackArtistCommentarySection.js +++ b/src/content/dependencies/generateTrackArtistCommentarySection.js @@ -28,7 +28,7 @@ export default { mainReleaseArtistCommentaryEntries: (track.isSecondaryRelease - ? track.mainReleaseTrack.commentary + ? track.commentaryFromMainRelease .map(entry => relation('generateCommentaryEntry', entry)) : null), diff --git a/src/data/things/track.js b/src/data/things/track.js index 3db5e183..c2dd7b8f 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -25,6 +25,7 @@ import { import {withPropertyFromObject} from '#composite/data'; import { + exitWithoutDependency, exposeConstant, exposeDependency, exposeDependencyOrContinue, @@ -469,6 +470,24 @@ export class Track extends Thing { exposeDependency({dependency: '#otherReleases'}), ], + commentaryFromMainRelease: [ + withMainRelease(), + + exitWithoutDependency({ + dependency: '#mainRelease', + value: input.value([]), + }), + + withPropertyFromObject({ + object: '#mainRelease', + property: input.value('commentary'), + }), + + exposeDependency({ + dependency: '#mainRelease.commentary', + }), + ], + groups: [ withPropertyFromAlbum({ property: input.value('groups'), -- cgit 1.3.0-6-gf8a5