mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 14:37:23 +03:00
Fix issue with early highlight breaking skipping
This commit is contained in:
@@ -961,14 +961,14 @@ function getNextSkipIndex(currentTime: number, includeIntersectingSegments: bool
|
|||||||
if ((minUnsubmittedSponsorTimeIndex === -1 && minSponsorTimeIndex !== -1) ||
|
if ((minUnsubmittedSponsorTimeIndex === -1 && minSponsorTimeIndex !== -1) ||
|
||||||
sponsorStartTimes[minSponsorTimeIndex] < unsubmittedSponsorStartTimes[minUnsubmittedSponsorTimeIndex]) {
|
sponsorStartTimes[minSponsorTimeIndex] < unsubmittedSponsorStartTimes[minUnsubmittedSponsorTimeIndex]) {
|
||||||
return {
|
return {
|
||||||
array: sponsorTimes,
|
array: sponsorTimes.filter((segment) => getCategoryActionType(segment.category) === CategoryActionType.Skippable),
|
||||||
index: minSponsorTimeIndex,
|
index: minSponsorTimeIndex,
|
||||||
endIndex: endTimeIndex,
|
endIndex: endTimeIndex,
|
||||||
openNotice: true
|
openNotice: true
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
array: sponsorTimesSubmitting,
|
array: sponsorTimesSubmitting.filter((segment) => getCategoryActionType(segment.category) === CategoryActionType.Skippable),
|
||||||
index: minUnsubmittedSponsorTimeIndex,
|
index: minUnsubmittedSponsorTimeIndex,
|
||||||
endIndex: previewEndTimeIndex,
|
endIndex: previewEndTimeIndex,
|
||||||
openNotice: false
|
openNotice: false
|
||||||
|
|||||||
Reference in New Issue
Block a user