mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 03:18:56 +01:00
test commit ignore pls
This commit is contained in:
parent
2b35a27252
commit
a4df679439
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ async getYouTubeApiVideo(f, v, contentlang, contentregion) {
|
||||||
|
|
||||||
// Retry fetching videoInfo if vid is null, limited to 3 retries
|
// Retry fetching videoInfo if vid is null, limited to 3 retries
|
||||||
let retryCount = 0;
|
let retryCount = 0;
|
||||||
while (!vid && retryCount < 3) {
|
while (vid.error && retryCount < 3) {
|
||||||
console.log(`Retrying fetching videoInfo... Retry ${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());
|
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);
|
vid = await this.getJson(retryVideoInfo);
|
||||||
|
|
Loading…
Reference in a new issue