From 7aea624c3e101c30e02e5ae08679ec243764632f Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 7 Mar 2024 12:19:19 -0400 Subject: data: apply contribution dates when resolving --- src/data/things/album.js | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) (limited to 'src/data/things/album.js') 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), -- cgit 1.3.0-6-gf8a5