diff options
Diffstat (limited to 'src/data/things')
-rw-r--r-- | src/data/things/artist.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/data/things/artist.js b/src/data/things/artist.js index ea19d2ba..1b313db6 100644 --- a/src/data/things/artist.js +++ b/src/data/things/artist.js @@ -96,6 +96,23 @@ export class Artist extends Thing { albumsAsBannerArtist: Artist.filterByContrib('albumData', 'bannerArtistContribs'), + albumsAsAny: { + flags: {expose: true}, + + expose: { + dependencies: ['albumData'], + + compute: ({albumData, [Artist.instance]: artist}) => + albumData?.filter((album) => + [ + ...album.artistContribs, + ...album.coverArtistContribs, + ...album.wallpaperArtistContribs, + ...album.bannerArtistContribs, + ].some(({who}) => who === artist)) ?? [], + }, + }, + albumsAsCommentator: { flags: {expose: true}, |