aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2021-08-22 20:47:46 -0400
committerAjay Ramachandran <[email protected]>2021-08-22 20:47:46 -0400
commit15706fd3c4d29ef062e2d465259acea1292d5808 (patch)
tree2f61de7ace3c9fdc0feee8274a40810269610a9c
parenta9e43f95f51dbf7f3517a0cb6956397fbe2b622f (diff)
downloadSponsorBlock-15706fd3c4d29ef062e2d465259acea1292d5808.tar.gz
SponsorBlock-15706fd3c4d29ef062e2d465259acea1292d5808.zip
Fix issue with early highlight breaking skipping
-rw-r--r--src/content.ts4
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