« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/artist.js162
1 files changed, 9 insertions, 153 deletions
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] = {