« get me outta code hell

data: use soupyFind everywhere - 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>2025-01-11 00:11:37 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-01-11 00:11:37 -0400
commit9d99dafca9dc4e16b867b707746314040a8d9ba5 (patch)
tree6928b4efcaeac5508d06c74ac3bfeefce0ce4b7d /src/data/things/track.js
parent8bbd9ac0b5cf8cc64ccbae7ae16b23f05d93d880 (diff)
data: use soupyFind everywhere
also notes where remaining directly-provided wikiData() props
are used
Diffstat (limited to 'src/data/things/track.js')
-rw-r--r--src/data/things/track.js24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js
index d88f366c..4662be89 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -222,8 +222,7 @@ export class Track extends Thing {
 
     originalReleaseTrack: singleReference({
       class: input.value(Track),
-      find: input.value(find.track),
-      data: 'trackData',
+      find: soupyFind.input('track'),
     }),
 
     // Internal use only - for directly identifying an album inside a track's
@@ -231,8 +230,7 @@ export class Track extends Thing {
     // included in an album's track list).
     dataSourceAlbum: singleReference({
       class: input.value(Album),
-      find: input.value(find.album),
-      data: 'albumData',
+      find: soupyFind.input('album'),
     }),
 
     artistContribs: [
@@ -354,8 +352,7 @@ export class Track extends Thing {
 
       referenceList({
         class: input.value(ArtTag),
-        find: input.value(find.artTag),
-        data: 'artTagData',
+        find: soupyFind.input('artTag'),
       }),
     ],
 
@@ -377,30 +374,29 @@ export class Track extends Thing {
 
     find: soupyFind(),
 
+    // used for referencedArtworkList (mixedFind)
+    // used for withAlbum (reverse)
     albumData: wikiData({
       class: input.value(Album),
     }),
 
-    artistData: wikiData({
-      class: input.value(Artist),
-    }),
-
-    artTagData: wikiData({
-      class: input.value(ArtTag),
-    }),
-
+    // used for featuredInFlashes (reverse)
     flashData: wikiData({
       class: input.value(Flash),
     }),
 
+    // used for referencedArtworkList (mixedFind)
+    // used for trackReverseReferenceList (reverse)
     trackData: wikiData({
       class: input.value(Track),
     }),
 
+    // used for withContainingTrackSection (reverse)
     trackSectionData: wikiData({
       class: input.value(TrackSection),
     }),
 
+    // used for withMatchingContributionPresets (indirectly by Contribution)
     wikiInfo: thing({
       class: input.value(WikiInfo),
     }),