« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/generateMusicVideoArtistsLine.js2
-rw-r--r--src/data/things/MusicVideo.js14
2 files changed, 6 insertions, 10 deletions
diff --git a/src/content/dependencies/generateMusicVideoArtistsLine.js b/src/content/dependencies/generateMusicVideoArtistsLine.js
index b1baac31..3cc1fb76 100644
--- a/src/content/dependencies/generateMusicVideoArtistsLine.js
+++ b/src/content/dependencies/generateMusicVideoArtistsLine.js
@@ -29,7 +29,7 @@ export default {
           return html.blank();
         }
 
-        if (data.label === 'Music video' || !data.label) {
+        if (!data.label) {
           credit.setSlots({
             normalStringKey:
               language.encapsulate(artistsLineCapsule, 'noLabel'),
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',
           }),
       },