Fix skipping not working

This commit is contained in:
Ajay
2023-02-22 00:11:56 -05:00
parent 00c09052dc
commit dfbe036119

View File

@@ -531,7 +531,7 @@ function cancelSponsorSchedule(): void {
/** /**
* @param currentTime Optional if you don't want to use the actual current time * @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<void> {
cancelSponsorSchedule(); cancelSponsorSchedule();
// Don't skip if advert playing and reset last checked time // 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 // Give up if video changed, and trigger a videoID change if so
if (checkIfNewVideoID()) { if (await checkIfNewVideoID()) {
return; return;
} }