diff options
author | Ajay Ramachandran <[email protected]> | 2021-08-22 20:47:46 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2021-08-22 20:47:46 -0400 |
commit | 15706fd3c4d29ef062e2d465259acea1292d5808 (patch) | |
tree | 2f61de7ace3c9fdc0feee8274a40810269610a9c | |
parent | a9e43f95f51dbf7f3517a0cb6956397fbe2b622f (diff) | |
download | SponsorBlock-15706fd3c4d29ef062e2d465259acea1292d5808.tar.gz SponsorBlock-15706fd3c4d29ef062e2d465259acea1292d5808.zip |
Fix issue with early highlight breaking skipping
-rw-r--r-- | src/content.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content.ts b/src/content.ts index aef49c24..a64642bc 100644 --- a/src/content.ts +++ b/src/content.ts @@ -961,14 +961,14 @@ function getNextSkipIndex(currentTime: number, includeIntersectingSegments: bool if ((minUnsubmittedSponsorTimeIndex === -1 && minSponsorTimeIndex !== -1) || sponsorStartTimes[minSponsorTimeIndex] < unsubmittedSponsorStartTimes[minUnsubmittedSponsorTimeIndex]) { return { - array: sponsorTimes, + array: sponsorTimes.filter((segment) => getCategoryActionType(segment.category) === CategoryActionType.Skippable), index: minSponsorTimeIndex, endIndex: endTimeIndex, openNotice: true }; } else { return { - array: sponsorTimesSubmitting, + array: sponsorTimesSubmitting.filter((segment) => getCategoryActionType(segment.category) === CategoryActionType.Skippable), index: minUnsubmittedSponsorTimeIndex, endIndex: previewEndTimeIndex, openNotice: false |