« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/data/checks.js8
-rw-r--r--src/data/things/artist.js5
-rw-r--r--src/data/things/flash.js9
3 files changed, 22 insertions, 0 deletions
diff --git a/src/data/checks.js b/src/data/checks.js
index 1300cbeb..44f3efd7 100644
--- a/src/data/checks.js
+++ b/src/data/checks.js
@@ -166,6 +166,10 @@ export function filterReferenceErrors(wikiData, {
       commentary: '_commentary',
     }],
 
+    ['flashData', {
+      commentary: '_commentary',
+    }],
+
     ['groupCategoryData', {
       groups: 'group',
     }],
@@ -489,6 +493,10 @@ export function reportContentTextErrors(wikiData, {
       contextNotes: '_content',
     }],
 
+    ['flashData', {
+      commentary: commentaryShape,
+    }],
+
     ['flashActData', {
       listTerminology: '_content',
     }],
diff --git a/src/data/things/artist.js b/src/data/things/artist.js
index 73acba69..841d652f 100644
--- a/src/data/things/artist.js
+++ b/src/data/things/artist.js
@@ -220,6 +220,11 @@ export class Artist extends Thing {
       data: 'flashData',
       list: input.value('contributorContribs'),
     }),
+
+    flashesAsCommentator: reverseReferenceList({
+      data: 'flashData',
+      list: input.value('commentatorArtists'),
+    }),
   });
 
   static [Thing.getSerializeDescriptors] = ({
diff --git a/src/data/things/flash.js b/src/data/things/flash.js
index d0aef04a..ceed79f7 100644
--- a/src/data/things/flash.js
+++ b/src/data/things/flash.js
@@ -20,6 +20,8 @@ import {
 
 import {
   color,
+  commentary,
+  commentatorArtists,
   contentString,
   contributionList,
   directory,
@@ -97,6 +99,8 @@ export class Flash extends Thing {
 
     urls: urls(),
 
+    commentary: commentary(),
+
     // Update only
 
     artistData: wikiData({
@@ -113,6 +117,8 @@ export class Flash extends Thing {
 
     // Expose only
 
+    commentatorArtists: commentatorArtists(),
+
     act: [
       withFlashAct(),
       exposeDependency({dependency: '#flashAct'}),
@@ -166,11 +172,14 @@ export class Flash extends Thing {
       'Cover Art File Extension': {property: 'coverArtFileExtension'},
 
       'Featured Tracks': {property: 'featuredTracks'},
+
       'Contributors': {
         property: 'contributorContribs',
         transform: parseContributors,
       },
 
+      'Commentary': {property: 'commentary'},
+
       'Review Points': {ignore: true},
     },
   };