« get me outta code hell

data, test: Album.trackSections: use direct links - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-08-05 12:19:58 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-08-05 20:42:08 -0300
commit0dc4db58b90f46cc938b72d571d690e197c6c243 (patch)
tree132d1f2fb76fa32cd60c26591ae92a3877c9bdd4 /src/data/things
parentbf2fcfa1f8e3791951ccee2a669e94fa27199e45 (diff)
data, test: Album.trackSections: use direct links
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/album.js19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/data/things/album.js b/src/data/things/album.js
index ee99c814..f1a7df3d 100644
--- a/src/data/things/album.js
+++ b/src/data/things/album.js
@@ -44,6 +44,7 @@ import {
   simpleString,
   singleReference,
   thing,
+  thingList,
   urls,
   wikiData,
 } from '#composite/wiki-properties';
@@ -136,10 +137,8 @@ export class Album extends Thing {
     creditSources: commentary(),
     additionalFiles: additionalFiles(),
 
-    trackSections: referenceList({
-      referenceType: input.value('unqualified-track-section'),
-      data: 'ownTrackSectionData',
-      find: input.value(find.unqualifiedTrackSection),
+    trackSections: thingList({
+      class: input.value(TrackSection),
     }),
 
     artistContribs: contributionList({
@@ -223,10 +222,6 @@ export class Album extends Thing {
       class: input.value(Group),
     }),
 
-    ownTrackSectionData: wikiData({
-      class: input.value(TrackSection),
-    }),
-
     wikiInfo: thing({
       class: input.value(WikiInfo),
     }),
@@ -476,13 +471,7 @@ export class Album extends Thing {
 
         albumData.push(album);
 
-        album.trackSections =
-          trackSections
-            .map(trackSection =>
-              `unqualified-track-section:` +
-              trackSection.unqualifiedDirectory);
-
-        album.ownTrackSectionData = trackSections;
+        album.trackSections = trackSections;
       }
 
       return {albumData, trackSectionData, trackData};