MCPcopy Index your code
hub / github.com/spicetify/cli / fetchNested

Function fetchNested

Extensions/shuffle+.js:325–335  ·  view source on GitHub ↗
(folder)

Source from the content-addressed store, hash-verified

323
324 const requestPlaylists = [];
325 async function fetchNested(folder) {
326 if (!folder.items) return;
327
328 for (const i of folder.items) {
329 if (i.type === "playlist") {
330 const uriObj = Spicetify.URI.fromString(i.uri);
331 const uri = uriObj._base62Id ?? uriObj.id;
332 requestPlaylists.push(await fetchPlaylistTracks(uri));
333 } else if (i.type === "folder") await fetchNested(i);
334 }
335 }
336
337 await fetchNested(requestFolder);
338

Callers 1

fetchFolderTracksFunction · 0.85

Calls 1

fetchPlaylistTracksFunction · 0.85

Tested by

no test coverage detected