This commit is contained in:
Ashley //// 2024-04-25 17:35:05 +00:00
parent a4df679439
commit 68d54e7ea1

View file

@ -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.error && retryCount < 3) { while (vid.error && retryCount < 2) {
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}&region=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text()); const retryVideoInfo = await fetch(`${this.config.invapi}/videos/${v}?hl=${contentlang}&region=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text());
vid = await this.getJson(retryVideoInfo); vid = await this.getJson(retryVideoInfo);