fix: handle iTunes rate-limit empty responses, reduce Spotify artwork concurrency
- itunesSearch: use r.text() + JSON.parse so empty body (rate-limit) returns [] instead of throwing - reduce Spotify artwork batch size 8→4 to avoid hammering iTunes and affecting global search Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
a61436669e
commit
2b6870583b
2 files changed
+7
-4
No files matched your search
+1
-1
@@ -172,7 +172,7 @@ async function _loadSpotifyTrackArtwork(tracks, listEl) {
|
||||
});
|
||||
|
||||
// Enrich each track with iTunes data — same call as global search
|
||||
const CONC = 8;
|
||||
const CONC = 4;
|
||||
for (let i = 0; i < tracks.length; i += CONC) {
|
||||
const batch = tracks.slice(i, i + CONC);
|
||||
await Promise.all(batch.map(async (t, bi) => {
|
||||
|
||||
Reference in new issue
Block a user