« get me outta code hell

data: annotated artwork references - 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-11-14 07:37:14 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-11-14 07:37:14 -0400
commit913f418eadb0b085c805ff1c83b749a0ce620741 (patch)
tree6d369056d724552ac5191930ae87c05b93ee64fc /src/data/checks.js
parentdb0fd78ca60fc695f87d1f3adf53967bdae2796f (diff)
data: annotated artwork references
Not used on-site, but this is all coded internally.
Diffstat (limited to 'src/data/checks.js')
-rw-r--r--src/data/checks.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/data/checks.js b/src/data/checks.js
index da7b228c..8c8e7a5d 100644
--- a/src/data/checks.js
+++ b/src/data/checks.js
@@ -183,8 +183,8 @@ export function filterReferenceErrors(wikiData, {
       bannerArtistContribs: '_contrib',
       groups: 'group',
       artTags: '_artTag',
-      referencedTrackArtworks: 'track',
-      referencedAlbumArtworks: 'album',
+      referencedTrackArtworks: '_trackArtwork',
+      referencedAlbumArtworks: '_albumArtwork',
       commentary: '_commentary',
     }],
 
@@ -221,8 +221,8 @@ export function filterReferenceErrors(wikiData, {
       referencedTracks: '_trackNotRerelease',
       sampledTracks: '_trackNotRerelease',
       artTags: '_artTag',
-      referencedTrackArtworks: 'track',
-      referencedAlbumArtworks: 'album',
+      referencedTrackArtworks: '_trackArtwork',
+      referencedAlbumArtworks: '_albumArtwork',
       originalReleaseTrack: '_trackNotRerelease',
       commentary: '_commentary',
     }],
@@ -289,6 +289,10 @@ export function filterReferenceErrors(wikiData, {
             let findFn;
 
             switch (findFnKey) {
+              case '_albumArtwork':
+                findFn = ref => boundFind.album(ref.reference);
+                break;
+
               case '_artTag':
                 findFn = boundFind.artTag;
                 break;
@@ -315,6 +319,10 @@ export function filterReferenceErrors(wikiData, {
                 findFn = boundFind.album;
                 break;
 
+              case '_trackArtwork':
+                findFn = ref => boundFind.track(ref.reference);
+                break;
+
               case '_trackNotRerelease':
                 findFn = trackRef => {
                   const track = boundFind.track(trackRef);