« get me outta code hell

data, data-checks: Flash.commentary (etc) - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-04 13:05:56 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-04-04 13:06:07 -0300
commita30da5289dbeaf3bf0fb89999a48fe20da4c63a4 (patch)
tree5773b9383352c1c3f6402376c30a26b19b8444e3
parent10485c6dda37017f0a82ba7f2f52ecd5b59df091 (diff)
data, data-checks: Flash.commentary (etc)
-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},
     },
   };