diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-03-06 14:24:15 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-18 22:56:02 -0300 |
commit | b1581465f66077c76dc4ac40324dc742ddd26fc8 (patch) | |
tree | 1cd7cfeccf351348caf6568f092738f2110f9188 /src | |
parent | 383dcc488d272e7da30c9b7d9cf3ec71f971a6cf (diff) |
data: Track.isOriginalRelease, Track.isRerelease
Diffstat (limited to 'src')
-rw-r--r-- | src/data/composite/things/track/index.js | 1 | ||||
-rw-r--r-- | src/data/things/track.js | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/data/composite/things/track/index.js b/src/data/composite/things/track/index.js index b76966d1..14fbdef0 100644 --- a/src/data/composite/things/track/index.js +++ b/src/data/composite/things/track/index.js @@ -8,6 +8,7 @@ export {default as withAlbum} from './withAlbum.js'; export {default as withAlwaysReferenceByDirectory} from './withAlwaysReferenceByDirectory.js'; export {default as withContainingTrackSection} from './withContainingTrackSection.js'; export {default as withHasUniqueCoverArt} from './withHasUniqueCoverArt.js'; +export {default as withOriginalRelease} from './withOriginalRelease.js'; export {default as withOtherReleases} from './withOtherReleases.js'; export {default as withPropertyFromAlbum} from './withPropertyFromAlbum.js'; export {default as withPropertyFromOriginalRelease} from './withPropertyFromOriginalRelease.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'}), |