« get me outta code hell

respect directory refs in early validation code - 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>2022-02-01 20:36:12 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-02-01 20:36:12 -0400
commitbc2db22a9c1f6475aaf901933e54eb85d005e031 (patch)
treec5fb1cb9c470ca6fe6fa31b20b13cbfe1a309c08
parentb10d00e4f4cf191ed9cb914052422db4363de349 (diff)
respect directory refs in early validation code
-rwxr-xr-xsrc/upd8.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 6f538d18..f78a21c4 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -2617,7 +2617,7 @@ async function main() {
         };
         let CR4SH = false;
         for (let name of artistNames) {
-            const entry = [...WD.artistData, ...WD.artistAliasData].find(entry => entry.name === name || entry.name.toLowerCase() === name.toLowerCase());
+            const entry = find.artist(name, {wikiData});
             if (!entry) {
                 clearBuffer();
                 console.log(`\x1b[31mMissing entry for artist "\x1b[1m${name}\x1b[0;31m"\x1b[0m`);
@@ -2627,10 +2627,6 @@ async function main() {
                 console.log(`\x1b[33mArtist "\x1b[1m${name}\x1b[0;33m" should be named "\x1b[1m${entry.alias}\x1b[0;33m"\x1b[0m`);
                 showWhere(name, 33);
                 CR4SH = true;
-            } else if (entry.name !== name) {
-                console.log(`\x1b[33mArtist "\x1b[1m${name}\x1b[0;33m" should be named "\x1b[1m${entry.name}\x1b[0;33m"\x1b[0m`);
-                showWhere(name, 33);
-                CR4SH = true;
             } else {
                 buffer.push(entry);
                 if (buffer.length > 3) {