« get me outta code hell

data: Track.excludingURLs, etc: false to ignore inherited value - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/yaml.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-05-19 16:42:18 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-05-19 16:42:41 -0300
commite518aba281c2deca085bcb1245f8da5448f28981 (patch)
tree2ac6821944eef52321846ed90905c888e45310ca /src/data/yaml.js
parentb47b2936814f6b61c2c8ce40367db2b99076efa2 (diff)
data: Track.excludingURLs, etc: false to ignore inherited value
Diffstat (limited to 'src/data/yaml.js')
-rw-r--r--src/data/yaml.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js
index ba627b29..5ddeb63e 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -762,12 +762,19 @@ export function parseURLs(entries) {
 }
 
 export function parseExcludingURLs(value) {
-  if (typeof value !== 'string') {
-    return value;
+  if (typeof value === 'boolean') {
+    switch (value) {
+      case true: return 'generic';
+      case false: return false;
+      // False is for nullifying an inherited reason for exclusion.
+    }
   }
 
-  switch (value) {
-    case 'paid bonus tracks': return 'paid bonus track';
+  if (typeof value === 'string') {
+    switch (value) {
+      case 'paid bonus tracks': return 'paid bonus track';
+      default: return value;
+    }
   }
 
   return value;