(rows, uri)
| 305 | } |
| 306 | |
| 307 | function searchFolder(rows, uri) { |
| 308 | for (const r of rows) { |
| 309 | if (r.type !== "folder" || !r.items) continue; |
| 310 | |
| 311 | if (r.uri === uri) return r; |
| 312 | |
| 313 | const found = searchFolder(r.items, uri); |
| 314 | if (found) return found; |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | async function fetchFolderTracks(uri) { |
| 319 | const res = await Spicetify.Platform.RootlistAPI.getContents(); |