« get me outta code hell

search: parent names, art tags, shenanigans - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-18 21:05:24 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-31 12:11:57 -0300
commit2fabadd375a05c79b37719abd5b41abcfa4ac0de (patch)
tree3465ca6f1e00944b3def99ee70c8f77dea449e0d /src/util
parent44987923fcf0db564042452366d9750aee656a4a (diff)
search: parent names, art tags, shenanigans
Diffstat (limited to 'src/util')
-rw-r--r--src/util/search-spec.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/util/search-spec.js b/src/util/search-spec.js
index a990d022..4d07019b 100644
--- a/src/util/search-spec.js
+++ b/src/util/search-spec.js
@@ -118,9 +118,23 @@ export const searchSpec = {
       fields.primaryName =
         thing.name;
 
+      fields.parentName =
+        (fields.kind === 'track'
+          ? thing.album.name
+       : fields.kind === 'group'
+          ? thing.category.name
+       : fields.kind === 'flash'
+          ? thing.act.name
+          : null);
+
       fields.color =
         thing.color;
 
+      fields.artTags =
+        (Object.hasOwn(thing, 'artTags')
+          ? thing.artTags.map(artTag => artTag.nameShort)
+          : []);
+
       fields.additionalNames =
         (Object.hasOwn(thing, 'additionalNames')
           ? thing.additionalNames.map(entry => entry.name)
@@ -173,6 +187,8 @@ export const searchSpec = {
     index: [
       'kind',
       'primaryName',
+      'parentName',
+      'artTags',
       'additionalNames',
       'contributors',
       'groups',