whoops
This commit is contained in:
parent
16e87dd51f
commit
66f249b2f3
|
@ -39,7 +39,7 @@ async function getChannel(id) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChannelVideos(instance, id) {
|
async function getChannelVideos(id) {
|
||||||
for (let i = 0; i < 5; i++) {
|
for (let i = 0; i < 5; i++) {
|
||||||
const videos = await actualRequest()
|
const videos = await actualRequest()
|
||||||
if (videos) return videos
|
if (videos) return videos
|
||||||
|
@ -49,6 +49,7 @@ async function getChannelVideos(instance, id) {
|
||||||
try {
|
try {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
const videos = []
|
const videos = []
|
||||||
|
const instance = await getInstance()
|
||||||
const json = await (await fetch(`${instance}/channel/${id}`)).json()
|
const json = await (await fetch(`${instance}/channel/${id}`)).json()
|
||||||
videos.push(...json.relatedStreams)
|
videos.push(...json.relatedStreams)
|
||||||
if (json.nextpage) await getNextPage(json.nextpage)
|
if (json.nextpage) await getNextPage(json.nextpage)
|
||||||
|
|
Loading…
Reference in New Issue