mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 12:07:11 +03:00
Fix cases where hidden segments are not skipped when a chapter is at the same time
Fixes #2228
This commit is contained in:
@@ -1499,7 +1499,10 @@ function getNextSkipIndex(currentTime: number, includeIntersectingSegments: bool
|
|||||||
|
|
||||||
const autoSkipSorter = (segment: ScheduledTime) => {
|
const autoSkipSorter = (segment: ScheduledTime) => {
|
||||||
const skipOption = utils.getCategorySelection(segment.category)?.option;
|
const skipOption = utils.getCategorySelection(segment.category)?.option;
|
||||||
if ((skipOption === CategorySkipOption.AutoSkip || shouldAutoSkip(segment))
|
if (segment.hidden !== SponsorHideType.Visible) {
|
||||||
|
// Hidden segments sometimes end up here if another segment is at the same time, use them last
|
||||||
|
return 3;
|
||||||
|
} else if ((skipOption === CategorySkipOption.AutoSkip || shouldAutoSkip(segment))
|
||||||
&& segment.actionType === ActionType.Skip) {
|
&& segment.actionType === ActionType.Skip) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (skipOption !== CategorySkipOption.ShowOverlay) {
|
} else if (skipOption !== CategorySkipOption.ShowOverlay) {
|
||||||
|
|||||||
Reference in New Issue
Block a user