From 66d132dbbc0de3e21fc04a7c9d9f86330aebda38 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:18:45 +0000 Subject: [PATCH] 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> --- js/api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/api.js b/js/api.js index 199fc1f..6956f4f 100644 --- a/js/api.js +++ b/js/api.js @@ -444,7 +444,9 @@ export class LosslessAPI { if (cached) return cached; 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(); // Check if backend returned an error or if this looks like individual fallback