From d2bc9d725c83ab8d6131598b7763c7e711f9697a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 19 Nov 2024 09:03:20 -0400 Subject: data: {Album, Track}.referencedByArtworks --- src/data/things/album.js | 10 ++++++++++ src/data/things/track.js | 9 +++++++++ 2 files changed, 19 insertions(+) (limited to 'src/data/things') diff --git a/src/data/things/album.js b/src/data/things/album.js index af7f0239..35cf1f3e 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -49,6 +49,7 @@ import { name, referencedArtworkList, referenceList, + reverseReferencedArtworkList, simpleDate, simpleString, singleReference, @@ -280,6 +281,15 @@ export class Album extends Thing { withTracks(), exposeDependency({dependency: '#tracks'}), ], + + referencedByArtworks: [ + exitWithoutContribs({ + contribs: 'coverArtistContribs', + value: input.value([]), + }), + + reverseReferencedArtworkList(), + ], }); static [Thing.getSerializeDescriptors] = ({ diff --git a/src/data/things/track.js b/src/data/things/track.js index 5c3161aa..0ac6aabd 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -50,6 +50,7 @@ import { referenceList, referencedArtworkList, reverseReferenceList, + reverseReferencedArtworkList, simpleDate, simpleString, singleReference, @@ -443,6 +444,14 @@ export class Track extends Thing { data: 'flashData', list: input.value('featuredTracks'), }), + + referencedByArtworks: [ + exitWithoutUniqueCoverArt({ + value: input.value([]), + }), + + reverseReferencedArtworkList(), + ], }); static [Thing.yamlDocumentSpec] = { -- cgit 1.3.0-6-gf8a5