« get me outta code hell

data: filterReferenceErrors: basic series album ref error report - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/checks.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-10-19 13:56:08 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-11-02 22:12:50 -0300
commit9bf9996d6f9eec874b3d1c2f4e4cafbc687c3f18 (patch)
treeed5bda42cc18fba82f3746285b778ce818836309 /src/data/checks.js
parent218adc112f343c8562ba081f0def7b3788b36781 (diff)
data: filterReferenceErrors: basic series album ref error report
Diffstat (limited to 'src/data/checks.js')
-rw-r--r--src/data/checks.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/data/checks.js b/src/data/checks.js
index f5aa551f..4dc1e1d0 100644
--- a/src/data/checks.js
+++ b/src/data/checks.js
@@ -208,6 +208,10 @@ export function filterReferenceErrors(wikiData, {
       flashes: 'flash',
     }],
 
+    ['groupData', {
+      serieses: '_serieses',
+    }],
+
     ['trackData', {
       artistContribs: '_contrib',
       contributorContribs: '_contrib',
@@ -258,6 +262,15 @@ export function filterReferenceErrors(wikiData, {
                 // need writing, humm...)
                 writeProperty = false;
                 break;
+
+              case '_serieses':
+                if (value) {
+                  // Doesn't report on which series has the error, but...
+                  value = value.flatMap(series => series.albums);
+                }
+
+                writeProperty = false;
+                break;
             }
 
             if (value === undefined) {
@@ -294,6 +307,10 @@ export function filterReferenceErrors(wikiData, {
                 };
                 break;
 
+              case '_serieses':
+                findFn = boundFind.album;
+                break;
+
               case '_trackNotRerelease':
                 findFn = trackRef => {
                   const track = boundFind.track(trackRef);