From b1581465f66077c76dc4ac40324dc742ddd26fc8 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 6 Mar 2024 14:24:15 -0400 Subject: data: Track.isOriginalRelease, Track.isRerelease --- src/data/things/track.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/data/things/track.js') diff --git a/src/data/things/track.js b/src/data/things/track.js index eda68a4e..3ead059a 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -27,6 +27,7 @@ import { exposeDependency, exposeDependencyOrContinue, exposeUpdateValueOrContinue, + exposeWhetherDependencyAvailable, } from '#composite/control-flow'; import { @@ -62,6 +63,7 @@ import { withAlwaysReferenceByDirectory, withContainingTrackSection, withHasUniqueCoverArt, + withOriginalRelease, withOtherReleases, withPropertyFromAlbum, } from '#composite/things/track'; @@ -348,6 +350,23 @@ export class Track extends Thing { exposeDependency({dependency: '#hasUniqueCoverArt'}), ], + isOriginalRelease: [ + withOriginalRelease(), + + exposeWhetherDependencyAvailable({ + dependency: '#originalRelease', + negate: input.value(true), + }), + ], + + isRerelease: [ + withOriginalRelease(), + + exposeWhetherDependencyAvailable({ + dependency: '#originalRelease', + }), + ], + otherReleases: [ withOtherReleases(), exposeDependency({dependency: '#otherReleases'}), -- cgit 1.3.0-6-gf8a5