mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Remove sponsor lookup retries
This commit is contained in:
@@ -95,10 +95,6 @@ window.addEventListener("DOMContentLoaded", () => utils.waitForElement(".ytp-inl
|
|||||||
addPageListeners();
|
addPageListeners();
|
||||||
addHotkeyListener();
|
addHotkeyListener();
|
||||||
|
|
||||||
//the amount of times the sponsor lookup has retried
|
|
||||||
//this only happens if there is an error
|
|
||||||
let sponsorLookupRetries = 0;
|
|
||||||
|
|
||||||
/** Segments created by the user which have not yet been submitted. */
|
/** Segments created by the user which have not yet been submitted. */
|
||||||
let sponsorTimesSubmitting: SponsorTime[] = [];
|
let sponsorTimesSubmitting: SponsorTime[] = [];
|
||||||
|
|
||||||
@@ -233,7 +229,6 @@ function resetValues() {
|
|||||||
|
|
||||||
//reset sponsor times
|
//reset sponsor times
|
||||||
sponsorTimes = null;
|
sponsorTimes = null;
|
||||||
sponsorLookupRetries = 0;
|
|
||||||
sponsorSkipped = [];
|
sponsorSkipped = [];
|
||||||
|
|
||||||
videoInfo = null;
|
videoInfo = null;
|
||||||
@@ -756,8 +751,6 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) {
|
|||||||
//otherwise the listener can handle it
|
//otherwise the listener can handle it
|
||||||
updatePreviewBar();
|
updatePreviewBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
sponsorLookupRetries = 0;
|
|
||||||
} else if (response?.status === 404) {
|
} else if (response?.status === 404) {
|
||||||
retryFetch();
|
retryFetch();
|
||||||
}
|
}
|
||||||
@@ -834,8 +827,6 @@ function retryFetch(): void {
|
|||||||
sponsorsLookup(sponsorVideoID);
|
sponsorsLookup(sponsorVideoID);
|
||||||
}
|
}
|
||||||
}, 10000 + Math.random() * 30000);
|
}, 10000 + Math.random() * 30000);
|
||||||
|
|
||||||
sponsorLookupRetries = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user