fix: itunesProxy use 2-arg https.get matching existing working pattern, smarter fallback

- itunesProxy: drop 3-arg form (url, options, cb) — use 2-arg (url, cb) like lookupItunesTrackMeta
- _iGet: if proxy returns {results:[]} trust it (iTunes said no results); only fall back to direct Apple if proxy gave no response at all

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-04-28 01:08:32 +02:00
1 parent 55be924805
commit ad8ba08a03
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -58,7 +58,8 @@ async function _iGet(proxyPath, directUrl) {
const base = S.cfg.backendUrl;
if (base) {
const d = await _fetch(base + proxyPath);
if (d && Object.keys(d).length) return d;
if (d?.results?.length) return d; // proxy returned real results
if (d?.results !== undefined) return d; // proxy responded but iTunes had no results (don't double-fetch)
}
return directUrl ? _fetch(directUrl) : {};
}