From 5ff9b10f2156a93366a5cf976f8aebc9437510b2 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 13 Jul 2022 12:15:56 -0400 Subject: [PATCH] Fix double skip issue --- src/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index cd073a56..01e9e8d8 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1230,7 +1230,7 @@ function getNextSkipIndex(currentTime: number, includeIntersectingSegments: bool (a, b) => ((autoSkipSorter(submittedArray[a]) - autoSkipSorter(submittedArray[b])) || (submittedArray[a].segment[1] - submittedArray[a].segment[0]) - (submittedArray[b].segment[1] - submittedArray[b].segment[0])))[0] ?? -1; // Store extra indexes for the non-auto skipping segments if others occur at the exact same start time - const extraIndexes = minSponsorTimeIndexes.filter((i) => i === minSponsorTimeIndex || autoSkipSorter(submittedArray[i]) !== 0); + const extraIndexes = minSponsorTimeIndexes.filter((i) => i !== minSponsorTimeIndex && autoSkipSorter(submittedArray[i]) !== 0); const endTimeIndex = getLatestEndTimeIndex(submittedArray, minSponsorTimeIndex);