From 1d996da933baf57fb79c32b00b35c5c5e15a36f3 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 2 Jun 2024 10:56:21 -0300 Subject: data: artist: drop {tracks,albums}as{Artist,Contributor,..etc..} --- src/data/things/artist.js | 162 +++------------------------------------------- 1 file changed, 9 insertions(+), 153 deletions(-) (limited to 'src/data/things') diff --git a/src/data/things/artist.js b/src/data/things/artist.js index 738f9c81..5d1d04a0 100644 --- a/src/data/things/artist.js +++ b/src/data/things/artist.js @@ -80,68 +80,6 @@ export class Artist extends Thing { // Expose only - tracksAsArtist: reverseContributionList({ - data: 'trackData', - list: input.value('artistContribs'), - }), - - tracksAsContributor: reverseContributionList({ - data: 'trackData', - list: input.value('contributorContribs'), - }), - - tracksAsCoverArtist: reverseContributionList({ - data: 'trackData', - list: input.value('coverArtistContribs'), - }), - - tracksAsAny: [ - withReverseContributionList({ - data: 'trackData', - list: input.value('artistContribs'), - }).outputs({ - '#reverseContributionList': '#tracksAsArtist', - }), - - withReverseContributionList({ - data: 'trackData', - list: input.value('contributorContribs'), - }).outputs({ - '#reverseContributionList': '#tracksAsContributor', - }), - - withReverseContributionList({ - data: 'trackData', - list: input.value('coverArtistContribs'), - }).outputs({ - '#reverseContributionList': '#tracksAsCoverArtist', - }), - - { - dependencies: [ - '#tracksAsArtist', - '#tracksAsContributor', - '#tracksAsCoverArtist', - ], - - compute: ({ - ['#tracksAsArtist']: tracksAsArtist, - ['#tracksAsContributor']: tracksAsContributor, - ['#tracksAsCoverArtist']: tracksAsCoverArtist, - }) => - unique([ - ...tracksAsArtist, - ...tracksAsContributor, - ...tracksAsCoverArtist, - ]), - }, - ], - - tracksAsCommentator: reverseReferenceList({ - data: 'trackData', - list: input.value('commentatorArtists'), - }), - trackArtistContributions: reverseContributionList({ data: 'trackData', list: input.value('artistContribs'), @@ -160,80 +98,8 @@ export class Artist extends Thing { mode: input.value('contributions'), }), - albumsAsAlbumArtist: reverseContributionList({ - data: 'albumData', - list: input.value('artistContribs'), - }), - - albumsAsCoverArtist: reverseContributionList({ - data: 'albumData', - list: input.value('coverArtistContribs'), - }), - - albumsAsWallpaperArtist: reverseContributionList({ - data: 'albumData', - list: input.value('wallpaperArtistContribs'), - }), - - albumsAsBannerArtist: reverseContributionList({ - data: 'albumData', - list: input.value('bannerArtistContribs'), - }), - - albumsAsAny: [ - withReverseContributionList({ - data: 'albumData', - list: input.value('artistContribs'), - }).outputs({ - '#reverseContributionList': '#albumsAsArtist', - }), - - withReverseContributionList({ - data: 'albumData', - list: input.value('coverArtistContribs'), - }).outputs({ - '#reverseContributionList': '#albumsAsCoverArtist', - }), - - withReverseContributionList({ - data: 'albumData', - list: input.value('wallpaperArtistContribs'), - }).outputs({ - '#reverseContributionList': '#albumsAsWallpaperArtist', - }), - - withReverseContributionList({ - data: 'albumData', - list: input.value('bannerArtistContribs'), - }).outputs({ - '#reverseContributionList': '#albumsAsBannerArtist', - }), - - { - dependencies: [ - '#albumsAsArtist', - '#albumsAsCoverArtist', - '#albumsAsWallpaperArtist', - '#albumsAsBannerArtist', - ], - - compute: ({ - ['#albumsAsArtist']: albumsAsArtist, - ['#albumsAsCoverArtist']: albumsAsCoverArtist, - ['#albumsAsWallpaperArtist']: albumsAsWallpaperArtist, - ['#albumsAsBannerArtist']: albumsAsBannerArtist, - }) => - unique([ - ...albumsAsArtist, - ...albumsAsCoverArtist, - ...albumsAsWallpaperArtist, - ...albumsAsBannerArtist, - ]), - }, - ], - - albumsAsCommentator: reverseReferenceList({ - data: 'albumData', + tracksAsCommentator: reverseReferenceList({ + data: 'trackData', list: input.value('commentatorArtists'), }), @@ -261,13 +127,8 @@ export class Artist extends Thing { mode: input.value('contributions'), }), - flashesAsContributor: reverseContributionList({ - data: 'flashData', - list: input.value('contributorContribs'), - }), - - flashesAsCommentator: reverseReferenceList({ - data: 'flashData', + albumsAsCommentator: reverseReferenceList({ + data: 'albumData', list: input.value('commentatorArtists'), }), @@ -277,6 +138,11 @@ export class Artist extends Thing { mode: input.value('contributions'), }), + flashesAsCommentator: reverseReferenceList({ + data: 'flashData', + list: input.value('commentatorArtists'), + }), + totalDuration: artistTotalDuration(), }); @@ -293,18 +159,8 @@ export class Artist extends Thing { aliasNames: S.id, - tracksAsArtist: S.toRefs, - tracksAsContributor: S.toRefs, - tracksAsCoverArtist: S.toRefs, tracksAsCommentator: S.toRefs, - - albumsAsAlbumArtist: S.toRefs, - albumsAsCoverArtist: S.toRefs, - albumsAsWallpaperArtist: S.toRefs, - albumsAsBannerArtist: S.toRefs, albumsAsCommentator: S.toRefs, - - flashesAsContributor: S.toRefs, }); static [Thing.findSpecs] = { -- cgit 1.3.0-6-gf8a5