max 150... no way i am archiving 4000 videos
This commit is contained in:
parent
4824f787d5
commit
2506e20125
|
@ -58,6 +58,8 @@ async function getChannelVideos(id) {
|
|||
async function getNextPage(payload) {
|
||||
const page = await (await fetch(`${instance}/nextpage/channel/${id}?nextpage=${encodeURIComponent(payload)}`)).json()
|
||||
videos.push(...page.relatedStreams)
|
||||
|
||||
if (videos.length >= 150) resolve(videos)
|
||||
if (page.nextpage) await getNextPage(page.nextpage)
|
||||
else resolve(videos)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue