From e82707fadb8a441c9ef8dc2de85a34d53d7c5abe Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 12 Feb 2026 17:55:47 -0400 Subject: client, search: disambiguate harder --- src/search-select.js | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'src/search-select.js') diff --git a/src/search-select.js b/src/search-select.js index a7dcf81a..81734140 100644 --- a/src/search-select.js +++ b/src/search-select.js @@ -3,7 +3,7 @@ // These files totally go together, so read them side by side, okay? import baseSearchSpec from '#search-shape'; -import {unique} from '#sugar'; +import {empty, unique} from '#sugar'; import {compareKebabCase} from '#wiki-data'; function prepareArtwork(artwork, thing, { @@ -127,8 +127,8 @@ function baselineProcess(thing, _opts) { fields.color = thing.color; - fields.disambiguator = - null; + fields.disambiguators = + []; return fields; } @@ -209,8 +209,21 @@ function genericProcess(thing, opts) { : 'track') : null); - fields.disambiguator = - fields.parentName; + fields.disambiguators = + (thing.isTrack + ? [ + (fields.classification === 'single' + ? null + : fields.parentName), + + (empty(thing.artistContribs) + ? null + : thing.artistContribs + .map(contrib => contrib.artist.name) + .join(', ')), + ] + + : [thing.parentName]); fields.artTags = (Array.from(new Set( -- cgit 1.3.0-6-gf8a5