(folder)
| 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 |
no test coverage detected