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:
1 parent
55be924805
commit
ad8ba08a03
2 files changed
+3
-2
No files matched your search
@@ -488,7 +488,7 @@ function _spTrackItem(t, defaultAlbum, defaultArt, defaultAlbumArtist) {
|
||||
|
||||
async function itunesProxy(url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
https.get(url, { headers: { 'User-Agent': 'iTunes/12.0' } }, res => {
|
||||
https.get(url, res => {
|
||||
let d = '';
|
||||
res.on('data', c => d += c);
|
||||
res.on('end', () => { try { resolve(JSON.parse(d)); } catch { resolve({}); } });
|
||||
|
||||
Reference in new issue
Block a user