diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-05-22 12:24:51 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-05-22 12:24:51 -0300 |
commit | 42c3d473637e56b89acf052fcc9a9ed44515bade (patch) | |
tree | 3b15fc385073753c32fbe4dc449d5918a0d57ba5 | |
parent | f6bd91ea9beef64e0ff0865560219a64a367bb5b (diff) |
filter missing refs from wiki info divide field
-rw-r--r-- | src/data/yaml.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js index fa967561..010fce4c 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -1189,6 +1189,10 @@ export function filterDuplicateDirectories(wikiData) { // data array. export function filterReferenceErrors(wikiData) { const referenceSpec = [ + ['wikiInfo', { + divideTrackListsByGroupsByRef: 'group', + }], + ['albumData', { artistContribsByRef: '_contrib', coverArtistContribsByRef: '_contrib', @@ -1240,7 +1244,8 @@ export function filterReferenceErrors(wikiData) { for (const [ thingDataProp, propSpec ] of referenceSpec) { const thingData = getNestedProp(wikiData, thingDataProp); aggregate.nest({message: `Reference errors in ${color.green('wikiData.' + thingDataProp)}`}, ({ nest }) => { - for (const thing of thingData) { + const things = Array.isArray(thingData) ? thingData : [thingData]; + for (const thing of things) { nest({message: `Reference errors in ${inspect(thing)}`}, ({ filter }) => { for (const [ property, findFnKey ] of Object.entries(propSpec)) { if (!thing[property]) continue; |