« 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.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things.js')
-rw-r--r--src/data/things.js36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/data/things.js b/src/data/things.js
index 7151c50..92763c1 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