diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-01-03 08:11:15 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-01-03 08:11:15 -0400 |
commit | a2488d2f5f5d1b9ef096c2d9968c56e6439adcac (patch) | |
tree | 2bb65015f29e3c3b76a58e5c80ced9bed1ca3a68 /src/data/things/album.js | |
parent | c6687d47da7d5e065b75b2ae22deb4671dd1671b (diff) |
data: with{Resolved,Reverse}AnnotatedReferenceList: dates
Diffstat (limited to 'src/data/things/album.js')
-rw-r--r-- | src/data/things/album.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/data/things/album.js b/src/data/things/album.js index 303c64b6..af3c6a92 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -106,7 +106,10 @@ export class Album extends Thing { dateAddedToWiki: simpleDate(), coverArtDate: [ - // TODO: Why does this fall back, but Track.coverArtDate doesn't? + // ~~TODO: Why does this fall back, but Track.coverArtDate doesn't?~~ + // TODO: OK so it's because tracks don't *store* dates just like that. + // Really instead of fallback being a flag, it should be a date value, + // if this option is worth existing at all. withCoverArtDate({ from: input.updateValue({ validate: isDate, @@ -242,7 +245,20 @@ export class Album extends Thing { value: input.value([]), }), - referencedArtworkList(), + { + dependencies: ['coverArtDate', 'date'], + compute: (continuation, { + coverArtDate, + date, + }) => continuation({ + ['#date']: + coverArtDate ?? date, + }), + }, + + referencedArtworkList({ + date: '#date', + }), ], // Update only |