From dfbe03611988edabb131a2ba12795980493c60d8 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 22 Feb 2023 00:11:56 -0500 Subject: [PATCH] Fix skipping not working --- src/content.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content.ts b/src/content.ts index 12719fe5..85ee317f 100644 --- a/src/content.ts +++ b/src/content.ts @@ -531,7 +531,7 @@ function cancelSponsorSchedule(): void { /** * @param currentTime Optional if you don't want to use the actual current time */ -function startSponsorSchedule(includeIntersectingSegments = false, currentTime?: number, includeNonIntersectingSegments = true): void { +async function startSponsorSchedule(includeIntersectingSegments = false, currentTime?: number, includeNonIntersectingSegments = true): Promise { cancelSponsorSchedule(); // Don't skip if advert playing and reset last checked time @@ -545,7 +545,7 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?: } // Give up if video changed, and trigger a videoID change if so - if (checkIfNewVideoID()) { + if (await checkIfNewVideoID()) { return; }