« get me outta code hell

search: index track/album groups in generic - 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-06 13:24:37 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-31 12:11:50 -0300
commitc7c8b8e8e62aaf78e2a31c557528b295dbe13820 (patch)
tree7db09b909ab31f00c9eee06c471c32caad31a3b6 /src/util
parente1b340cf9693ecd1436260509e91680078d6ec98 (diff)
search: index track/album groups in generic
Diffstat (limited to 'src/util')
-rw-r--r--src/util/search-spec.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/search-spec.js b/src/util/search-spec.js
index d8ae936e..2cdbffa7 100644
--- a/src/util/search-spec.js
+++ b/src/util/search-spec.js
@@ -64,6 +64,13 @@ export const searchSpec = {
           .map(contrib => contrib.artist)
           .flatMap(artist => [artist.name, ...artist.aliasNames]),
 
+      groups:
+        (Object.hasOwn(thing, 'groups')
+          ? thing.groups.map(group => group.name)
+       : Object.hasOwn(thing, 'album')
+          ? thing.album.groups.map(group => group.name)
+          : []),
+
       artwork:
         prepareArtwork(thing),
     }),
@@ -72,6 +79,7 @@ export const searchSpec = {
       'primaryName',
       'additionalNames',
       'contributors',
+      'groups',
     ],
 
     store: [