diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-02-16 23:04:08 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-02-16 23:04:08 -0400 |
commit | f8557485ac06a7b2527c50dcf638497212678a16 (patch) | |
tree | d869354ea475d517f1ef0ac699107f94355187b9 /src/data | |
parent | a447a03576ec5e346b0381f0845ecdc302d7e11f (diff) |
pre-writes: art tags, artists & aliases
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/things.js | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/data/things.js b/src/data/things.js index 7151c507..92763c14 100644 --- a/src/data/things.js +++ b/src/data/things.js @@ -546,7 +546,7 @@ Track.propertyDescriptors = { compute: ({ artTagsByRef, artTagData }) => ( (artTagsByRef && artTagData ? (artTagsByRef - .map(ref => find.tag(ref, {wikiData: {tagData: artTagData}})) + .map(ref => find.tag(ref, {wikiData: {artTagData}})) .filter(Boolean)) : []) ) @@ -570,6 +570,40 @@ Artist.propertyDescriptors = { validate: validateArrayItems(isName) } }, + + isAlias: Thing.common.flag(), + aliasedArtistRef: Thing.common.singleReference(Artist), + + // Update only + + artistData: Thing.common.wikiData(Artist), + + // Expose only + + aliasedArtist: { + flags: {expose: true}, + + expose: { + dependencies: ['artistData', 'aliasedArtistRef'], + compute: ({ artistData, aliasedArtistRef }) => ( + (aliasedArtistRef && artistData + ? find.artist(aliasedArtistRef, {wikiData: {artistData}}, {quiet: true}) + : null) + ) + } + }, + + // albumsAsCoverArtist + // albumsAsWallpaperArtist + // albumsAsBannerArtist + // albumsAsCommentator + + // tracksAsArtist + // tracksAsContributor + // tracksAsCoverArtist + // tracksAsCommentator + + // flashesAsContributor }; // -> Group |