mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 13:37:04 +03:00
give more time for chapters to load
This commit is contained in:
@@ -1206,7 +1206,7 @@ async function sponsorsLookup(keepOldSubmissions = true) {
|
||||
function importExistingChapters(wait: boolean) {
|
||||
if (!existingChaptersImported) {
|
||||
waitFor(() => video?.duration && getExistingChapters(sponsorVideoID, video.duration),
|
||||
wait ? 5000 : 0, 100, (c) => c?.length > 0).then((chapters) => {
|
||||
wait ? 15000 : 0, 400, (c) => c?.length > 0).then((chapters) => {
|
||||
if (!existingChaptersImported && chapters?.length > 0) {
|
||||
sponsorTimes = (sponsorTimes ?? []).concat(...chapters).sort((a, b) => a.segment[0] - b.segment[0]);
|
||||
existingChaptersImported = true;
|
||||
|
||||
Reference in New Issue
Block a user