From 1a6e6279c83f52fc13811517a29c49c025264cda Mon Sep 17 00:00:00 2001 From: Ajay Date: Sun, 24 Jul 2022 21:45:25 -0400 Subject: [PATCH] Fix autoskipping when skips load before video --- src/content.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/content.ts b/src/content.ts index 92b59eca..1a00dbef 100644 --- a/src/content.ts +++ b/src/content.ts @@ -753,6 +753,14 @@ function setupVideoListeners() { || (lastCheckVideoTime !== video.currentTime && Date.now() - lastCheckTime > 2000)}`); } + if (switchingVideos) { + switchingVideos = false; + logDebug("Setting switching videos to false"); + + // If already segments loaded before video, retry to skip starting segments + if (sponsorTimes) startSkipScheduleCheckingForStartSponsors(); + } + // Make sure it doesn't get double called with the play event if (Math.abs(lastCheckVideoTime - video.currentTime) > 0.3 || (lastCheckVideoTime !== video.currentTime && Date.now() - lastCheckTime > 2000)) {