From fe86bf06ca74b11c7811bdca8b079eaf88a14896 Mon Sep 17 00:00:00 2001 From: Ashley //// Date: Thu, 25 Apr 2024 17:58:49 +0000 Subject: [PATCH] do 2 --- src/libpoketube/libpoketube-core.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libpoketube/libpoketube-core.js b/src/libpoketube/libpoketube-core.js index 2740d8c0..0cd49cf2 100644 --- a/src/libpoketube/libpoketube-core.js +++ b/src/libpoketube/libpoketube-core.js @@ -108,9 +108,8 @@ 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) { + let retryCount = 0; + while (vid.error && retryCount < 2) { console.log(`Retrying fetching videoInfo... Retry ${retryCount + 1}`); const retryVideoInfo = await fetch(`https://iv.ggtyler.dev/api/v1/videos/${v}?hl=${contentlang}®ion=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text()); vid = await this.getJson(retryVideoInfo);