« get me outta code hell

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:
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);