« 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/group.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/group.js
parent8bbd9ac0b5cf8cc64ccbae7ae16b23f05d93d880 (diff)
data: use soupyFind everywhere
also notes where remaining directly-provided wikiData() props
are used
Diffstat (limited to 'src/data/things/group.js')
-rw-r--r--src/data/things/group.js23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/data/things/group.js b/src/data/things/group.js
index 8418cb99..ffcc287c 100644
--- a/src/data/things/group.js
+++ b/src/data/things/group.js
@@ -13,6 +13,7 @@ import {
   name,
   referenceList,
   seriesList,
+  soupyFind,
   urls,
   wikiData,
 } from '#composite/wiki-properties';
@@ -32,8 +33,7 @@ export class Group extends Thing {
 
     closelyLinkedArtists: annotatedReferenceList({
       class: input.value(Artist),
-      find: input.value(find.artist),
-      data: 'artistData',
+      find: soupyFind.input('artist'),
 
       date: input.value(null),
 
@@ -43,8 +43,7 @@ export class Group extends Thing {
 
     featuredAlbums: referenceList({
       class: input.value(Album),
-      find: input.value(find.album),
-      data: 'albumData',
+      find: soupyFind.input('album'),
     }),
 
     serieses: seriesList({
@@ -53,14 +52,15 @@ export class Group extends Thing {
 
     // Update only
 
+    find: soupyFind(),
+
+    // used for albums (reverse)
     albumData: wikiData({
       class: input.value(Album),
     }),
 
-    artistData: wikiData({
-      class: input.value(Artist),
-    }),
-
+    // used for category (reverse)
+    // used for color (reverse)
     groupCategoryData: wikiData({
       class: input.value(GroupCategory),
     }),
@@ -210,15 +210,12 @@ export class GroupCategory extends Thing {
 
     groups: referenceList({
       class: input.value(Group),
-      find: input.value(find.group),
-      data: 'groupData',
+      find: soupyFind.input('group'),
     }),
 
     // Update only
 
-    groupData: wikiData({
-      class: input.value(Group),
-    }),
+    find: soupyFind(),
   });
 
   static [Thing.yamlDocumentSpec] = {