Use direct TIDAL combined search only before hifi-api fallback
Agent-Logs-Url: https://github.com/monochrome-music/monochrome/sessions/b34dfb4a-cfae-459a-ac01-4c675551575b Co-authored-by: binimum <61615730+binimum@users.noreply.github.com>
This commit is contained in:
parent
05b02b1000
commit
66d132dbbc
1 changed files with 3 additions and 1 deletions
|
|
@ -444,7 +444,9 @@ export class LosslessAPI {
|
||||||
if (cached) return cached;
|
if (cached) return cached;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await this.fetchWithRetry(`/search/?q=${encodeURIComponent(query)}`, options);
|
// Keep direct TIDAL combined search behavior for normal mode.
|
||||||
|
// If direct query fails, fall back to hifi-api-compatible scoped searches (?s, ?a, ?al, ?v, ?p).
|
||||||
|
const response = await HiFiClient.instance.query(`/search/?q=${encodeURIComponent(query)}`, options.signal);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
// Check if backend returned an error or if this looks like individual fallback
|
// Check if backend returned an error or if this looks like individual fallback
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue