« get me outta code hell

content, data: simplify title vs label, use null label as intended - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/MusicVideo.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-04-05 09:32:18 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-04-05 09:32:18 -0300
commitb119249988890273fc4879871eb88decf61a5338 (patch)
treedc1112b685281a985c121c570058694effddefb1 /src/data/things/MusicVideo.js
parentdd4af0fc73e53e0f2cf3d176e0c16dcce6cedcbd (diff)
content, data: simplify title vs label, use null label as intended preview
Diffstat (limited to 'src/data/things/MusicVideo.js')
-rw-r--r--src/data/things/MusicVideo.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/data/things/MusicVideo.js b/src/data/things/MusicVideo.js
index acdfaa2b..38387a30 100644
--- a/src/data/things/MusicVideo.js
+++ b/src/data/things/MusicVideo.js
@@ -40,21 +40,17 @@ export class MusicVideo extends Thing {
       update: {validate: isStringNonEmpty},
     },
 
-    label: [
-      exposeUpdateValueOrContinue({
-        validate: input.value(isStringNonEmpty),
-      }),
-
-      exitWithoutDependency('title', V('Music video')),
-      exposeConstant(V(null)),
-    ],
+    label: {
+      flags: {update: true, expose: true},
+      update: {validate: isStringNonEmpty},
+    },
 
     unqualifiedDirectory: [
       {
         dependencies: ['title', 'label'],
         compute: (continuation, {title, label}) =>
           continuation({
-            '#name': label ?? title,
+            '#name': label ?? title ?? 'music video',
           }),
       },