mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Prevent retry fetching in another place
https://github.com/ajayyy/SponsorBlock/issues/667
This commit is contained in:
parent
a9a85d9816
commit
42fa6c44c4
1 changed files with 5 additions and 1 deletions
|
@ -621,7 +621,11 @@ async function sponsorsLookup(id: string) {
|
|||
|
||||
//TODO lower when server becomes better (back to 1 second)
|
||||
//some error occurred, try again in a second
|
||||
setTimeout(() => sponsorsLookup(id), 5000 + Math.random() * 15000 + 5000 * sponsorLookupRetries);
|
||||
setTimeout(() => {
|
||||
if (sponsorVideoID && sponsorTimes?.length === 0) {
|
||||
sponsorsLookup(sponsorVideoID);
|
||||
}
|
||||
}, 5000 + Math.random() * 15000 + 5000 * sponsorLookupRetries);
|
||||
|
||||
sponsorLookupRetries++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue