« get me outta code hell

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:
Diffstat (limited to 'src/data/things/Track.js')
-rw-r--r--src/data/things/Track.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/data/things/Track.js b/src/data/things/Track.js
index db5495d7..8af7069e 100644
--- a/src/data/things/Track.js
+++ b/src/data/things/Track.js
@@ -659,7 +659,7 @@ export class Track extends Thing {
       update: {
         validate:
           anyOf(
-            is('album'),
+            is('album', 'section'),
             isString),
       },
     },
@@ -842,6 +842,16 @@ export class Track extends Thing {
       },
     ],
 
+    nameDetailIsFromDetail: {
+      flags: {expose: true},
+      expose: {
+        dependencies: ['_nameDetail'],
+        compute: ({['_nameDetail']: nameDetail}) =>
+          nameDetail === 'album' ||
+          nameDetail === 'section',
+      },
+    },
+
     isMainRelease:
       exposeWhetherDependencyAvailable({
         dependency: 'mainReleaseTrack',