mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 07:58:28 +01:00
fix videos :3
This commit is contained in:
parent
23e742697a
commit
d445e462c5
1 changed files with 0 additions and 8 deletions
|
@ -108,14 +108,6 @@ async getYouTubeApiVideo(f, v, contentlang, contentregion) {
|
|||
var p = this.getJson(await channel_uploads.text());
|
||||
}
|
||||
|
||||
// Retry fetching videoInfo if vid is null, limited to 3 retries
|
||||
let retryCount = 0;
|
||||
while (vid.error && retryCount < 1) {
|
||||
console.log(`Retrying fetching videoInfo... Retry ${retryCount + 1}`);
|
||||
const retryVideoInfo = await fetch(`${this.config.invapi}/videos/${v}?hl=${contentlang}®ion=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text());
|
||||
vid = await this.getJson(retryVideoInfo);
|
||||
retryCount++;
|
||||
}
|
||||
|
||||
if (!vid) {
|
||||
console.log(
|
||||
|
|
Loading…
Reference in a new issue