« get me outta code hell

data, checks: fuzz "Main Release: same name single" - 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>2025-10-03 17:01:33 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-10-03 17:01:33 -0300
commit590acab709aca1c9ded2feb6de8d170de554340b (patch)
treee0d7e6b64c00e9ae8fd36784ce3301edbfaeaadc
parent6fc42ff35523ff3d09aa0811ebdc54ac92807680 (diff)
data, checks: fuzz "Main Release: same name single"
-rw-r--r--src/data/checks.js7
-rw-r--r--src/data/composite/things/track/withMainRelease.js6
2 files changed, 12 insertions, 1 deletions
diff --git a/src/data/checks.js b/src/data/checks.js
index b7a237ad..fb4a9673 100644
--- a/src/data/checks.js
+++ b/src/data/checks.js
@@ -353,7 +353,12 @@ export function filterReferenceErrors(wikiData, {
                   if (ref === 'same name single') {
                     // Accessing the current thing here.
                     try {
-                      return boundFind.albumSinglesOnly(thing.name);
+                      return boundFind.albumSinglesOnly(thing.name, {
+                        fuzz: {
+                          capitalization: true,
+                          kebab: true,
+                        },
+                      });
                     } catch (caughtError) {
                       throw new Error(
                         `Didn't match a single with the same name`,
diff --git a/src/data/composite/things/track/withMainRelease.js b/src/data/composite/things/track/withMainRelease.js
index f1b0841a..67a312ae 100644
--- a/src/data/composite/things/track/withMainRelease.js
+++ b/src/data/composite/things/track/withMainRelease.js
@@ -67,6 +67,12 @@ export default templateCompositeFrom({
     withResolvedReference({
       ref: '#sameNameSingleReference',
       find: soupyFind.input('albumSinglesOnly'),
+      findOptions: input.value({
+        fuzz: {
+          capitalization: true,
+          kebab: true,
+        },
+      }),
     }).outputs({
       '#resolvedReference': '#sameNameSingle',
     }),