import singles: default the Identify search to "artist - title" (dash)
Discord (Shdjfgatdif): the import-singles Identify search prefilled "artist title" (space), so "Sub Focus Last Jungle" returned junk while "Sub Focus - Last Jungle" found the track. The placeholder already hints "Search artist - title..."; the prefill just did not match it. Join with " - " instead of " ". filter(Boolean) keeps a lone title (no artist) dash-free.
This commit is contained in:
parent
8abf470018
commit
969700674c
1 changed files with 4 additions and 1 deletions
|
|
@ -50,7 +50,10 @@ export function SinglesImportTab() {
|
||||||
|
|
||||||
setOpenSingleSearch(fileKey);
|
setOpenSingleSearch(fileKey);
|
||||||
const defaultQuery =
|
const defaultQuery =
|
||||||
[file?.artist, file?.title].filter(Boolean).join(' ') ||
|
// "artist - title" (the placeholder hints this, and source search needs the
|
||||||
|
// dash to disambiguate — "Sub Focus Last Jungle" finds junk, "Sub Focus - Last
|
||||||
|
// Jungle" finds the track). filter(Boolean) keeps a lone title dash-free.
|
||||||
|
[file?.artist, file?.title].filter(Boolean).join(' - ') ||
|
||||||
(file?.filename || '').replace(/\.[^.]+$/, '');
|
(file?.filename || '').replace(/\.[^.]+$/, '');
|
||||||
ensureSingleSearch(fileKey, defaultQuery);
|
ensureSingleSearch(fileKey, defaultQuery);
|
||||||
if (defaultQuery && !singleSearches[fileKey]?.results.length) {
|
if (defaultQuery && !singleSearches[fileKey]?.results.length) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue