diff options
Diffstat (limited to 'src/data/things')
-rw-r--r-- | src/data/things/album.js | 44 | ||||
-rw-r--r-- | src/data/things/flash.js | 4 | ||||
-rw-r--r-- | src/data/things/track.js | 13 |
3 files changed, 54 insertions, 7 deletions
diff --git a/src/data/things/album.js b/src/data/things/album.js index 6b37bc96..b0a46af1 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -136,11 +136,45 @@ export class Album extends Thing { find: input.value(find.unqualifiedTrackSection), }), - artistContribs: contributionList(), - coverArtistContribs: contributionList(), - trackCoverArtistContribs: contributionList(), - wallpaperArtistContribs: contributionList(), - bannerArtistContribs: contributionList(), + artistContribs: contributionList({ + date: 'date', + }), + + coverArtistContribs: [ + withCoverArtDate({ + fallback: input.value(true), + }), + + contributionList({ + date: '#coverArtDate', + }), + ], + + trackCoverArtistContribs: contributionList({ + // May be null, indicating cover art was added for tracks on the date + // each track specifies, or else the track's own release date. + date: 'trackArtDate', + }), + + wallpaperArtistContribs: [ + withCoverArtDate({ + fallback: input.value(true), + }), + + contributionList({ + date: '#coverArtDate', + }), + ], + + bannerArtistContribs: [ + withCoverArtDate({ + fallback: input.value(true), + }), + + contributionList({ + date: '#coverArtDate', + }), + ], groups: referenceList({ class: input.value(Group), diff --git a/src/data/things/flash.js b/src/data/things/flash.js index 2c0c1417..7d37ed81 100644 --- a/src/data/things/flash.js +++ b/src/data/things/flash.js @@ -98,7 +98,9 @@ export class Flash extends Thing { coverArtDimensions: dimensions(), - contributorContribs: contributionList(), + contributorContribs: contributionList({ + date: 'date', + }), featuredTracks: referenceList({ class: input.value(Track), diff --git a/src/data/things/track.js b/src/data/things/track.js index 57d2ed20..5410889f 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -194,9 +194,12 @@ export class Track extends Thing { artistContribs: [ inheritContributionListFromOriginalRelease(), + withDate(), + withResolvedContribs({ from: input.updateValue({validate: isContributionList}), thingProperty: input.thisProperty(), + date: '#date', }).outputs({ '#resolvedContribs': '#artistContribs', }), @@ -219,7 +222,10 @@ export class Track extends Thing { contributorContribs: [ inheritContributionListFromOriginalRelease(), - contributionList(), + + contributionList({ + date: 'date', + }), ], // Cover artists aren't inherited from the original release, since it @@ -230,9 +236,14 @@ export class Track extends Thing { value: input.value([]), }), + withTrackArtDate({ + fallback: input.value(true), + }), + withResolvedContribs({ from: input.updateValue({validate: isContributionList}), thingProperty: input.thisProperty(), + date: '#trackArtDate', }).outputs({ '#resolvedContribs': '#coverArtistContribs', }), |