We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
retrievelQueue
1 parent 3ba7cf3 commit c30e49cCopy full SHA for c30e49c
src/index.js
@@ -3304,7 +3304,13 @@ async function retrieveBackgrounds() {
3304
async function retrieveMetadata() {
3305
3306
// find the first MAX_METADATA_REQUESTS items for which we haven't retrieved the metadata yet
3307
- const retrievalQueue = Array.from(playlist.children).filter(el => el.dataset.retrieve).slice(0, MAX_METADATA_REQUESTS);
+ const retrievalQueue = [];
3308
+ for (const el of playlist.children) {
3309
+ if (el.dataset.retrieve) {
3310
+ retrievalQueue.push(el);
3311
+ if (retrievalQueue.length >= MAX_METADATA_REQUESTS) break;
3312
+ }
3313
3314
3315
// Process in parallel
3316
return Promise.all(retrievalQueue.map(async queueItem => {
0 commit comments