From ca24e82a6d42f15e414c773297a91cc3416e8465 Mon Sep 17 00:00:00 2001 From: Ajay Date: Sat, 6 May 2023 20:04:17 -0400 Subject: [PATCH] Fix skip looping Fixes #1747 --- src/content.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/content.ts b/src/content.ts index c0689c4a..8a8f033c 100644 --- a/src/content.ts +++ b/src/content.ts @@ -661,6 +661,11 @@ async function startSponsorSchedule(includeIntersectingSegments = false, current forcedSkipTime = forceVideoTime + 0.001; } + // Don't pretend to be earlier than we are, could result in loops + if (forcedSkipTime !== null && forceVideoTime > forcedSkipTime) { + forcedSkipTime = null; + } + startSponsorSchedule(forcedIncludeIntersectingSegments, forcedSkipTime, forcedIncludeNonIntersectingSegments); };