« get me outta code hell

data: various nicer drops in invalidFieldCombinations - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/Track.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-06-11 17:37:16 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-06-11 17:37:16 -0300
commit74e869bf0772171cdf7cfd76a24afd5653235e5a (patch)
treef4bbdb53b27db3d2d65ae20d8a1c86ffaf4f1f38 /src/data/things/Track.js
parenta07125a6500366436e536be1737105ede1be97c5 (diff)
data: various nicer drops in invalidFieldCombinations
Diffstat (limited to 'src/data/things/Track.js')
-rw-r--r--src/data/things/Track.js59
1 files changed, 43 insertions, 16 deletions
diff --git a/src/data/things/Track.js b/src/data/things/Track.js
index f6b3346c..0806de36 100644
--- a/src/data/things/Track.js
+++ b/src/data/things/Track.js
@@ -1265,20 +1265,38 @@ export class Track extends Thing {
     },
 
     invalidFieldCombinations: [
-      {message: `Secondary releases never count in artist totals`, fields: [
-        'Main Release',
-        'Count In Artist Totals',
-      ]},
+      {
+        message: `Secondary releases never count in artist totals`,
 
-      {message: `Secondary releases inherit references from the main one`, fields: [
-        'Main Release',
-        'Referenced Tracks',
-      ]},
+        fields: [
+          'Main Release',
+          'Count In Artist Totals',
+        ],
 
-      {message: `Secondary releases inherit samples from the main one`, fields: [
-        'Main Release',
-        'Sampled Tracks',
-      ]},
+        drop: ['Count In Artist Totals'],
+      },
+
+      {
+        message: `Secondary releases inherit references from the main one`,
+
+        fields: [
+          'Main Release',
+          'Referenced Tracks',
+        ],
+
+        drop: ['Referenced Tracks'],
+      },
+
+      {
+        message: `Secondary releases inherit samples from the main one`,
+
+        fields: [
+          'Main Release',
+          'Sampled Tracks',
+        ],
+
+        drop: ['Sampled Tracks'],
+      },
 
       {
         message: ({'Has Cover Art': hasCoverArt}) =>
@@ -1290,6 +1308,9 @@ export class Track extends Thing {
           'Has Cover Art',
           'Cover Artists',
         ],
+
+        // We ball - data code handles this as it might.
+        drop: [],
       },
 
       {message: `Only one unique date per track is supported`, fields: [
@@ -1297,10 +1318,16 @@ export class Track extends Thing {
         'Date Posted',
       ]},
 
-      {message: `Don't include URLs alongside Excluding URLs, unless Excluding URLs is false`, fields: [
-        'URLs',
-        ['Excluding URLs', v => v !== false],
-      ]},
+      {
+        message: `Don't include URLs alongside Excluding URLs, unless Excluding URLs is false`,
+
+        fields: [
+          'URLs',
+          ['Excluding URLs', v => v !== false],
+        ],
+
+        drop: ['URLs'],
+      },
     ],
   };