mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-16 08:27:03 +03:00
Fix stackoverflow
This commit is contained in:
@@ -509,22 +509,25 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?:
|
|||||||
if (incorrectVideoCheck(videoID, currentSkip)) return;
|
if (incorrectVideoCheck(videoID, currentSkip)) return;
|
||||||
forceVideoTime ||= video.currentTime;
|
forceVideoTime ||= video.currentTime;
|
||||||
|
|
||||||
if ((shouldSkip(currentSkip) || sponsorTimesSubmitting?.some((segment) => segment.segment === currentSkip.segment))
|
if ((shouldSkip(currentSkip) || sponsorTimesSubmitting?.some((segment) => segment.segment === currentSkip.segment))) {
|
||||||
&& forceVideoTime >= skipTime[0] && forceVideoTime < skipTime[1]) {
|
if (forceVideoTime >= skipTime[0] && forceVideoTime < skipTime[1]) {
|
||||||
skipToTime({
|
skipToTime({
|
||||||
v: video,
|
v: video,
|
||||||
skipTime,
|
skipTime,
|
||||||
skippingSegments,
|
skippingSegments,
|
||||||
openNotice: skipInfo.openNotice
|
openNotice: skipInfo.openNotice
|
||||||
});
|
});
|
||||||
|
|
||||||
if (utils.getCategorySelection(currentSkip.category)?.option === CategorySkipOption.ManualSkip
|
if (utils.getCategorySelection(currentSkip.category)?.option === CategorySkipOption.ManualSkip
|
||||||
|| currentSkip.actionType === ActionType.Mute) {
|
|| currentSkip.actionType === ActionType.Mute) {
|
||||||
forcedSkipTime = skipTime[0] + 0.001;
|
forcedSkipTime = skipTime[0] + 0.001;
|
||||||
|
} else {
|
||||||
|
forcedSkipTime = skipTime[1];
|
||||||
|
forcedIncludeIntersectingSegments = true;
|
||||||
|
forcedIncludeNonIntersectingSegments = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
forcedSkipTime = skipTime[1];
|
forcedSkipTime = forceVideoTime + 0.001;
|
||||||
forcedIncludeIntersectingSegments = true;
|
|
||||||
forcedIncludeNonIntersectingSegments = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user