diff --git a/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockTask.bs b/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockTask.bs index bed802c4..e59c1b48 100644 --- a/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockTask.bs +++ b/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockTask.bs @@ -105,8 +105,12 @@ function ShouldShowNotification(segment as object, categories as object) as bool return option = SponsorBlock.SegmentAction.AutoSkip or option = SponsorBlock.SegmentAction.ManualSkip end function -function PadHightlightSegment(segments as object, lengthSeconds as integer) as object - for each segment in segments +function PadHightlightSegment(skipSegments as object, lengthSeconds as integer) as object + if skipSegments = invalid + return invalid + end if + + for each segment in skipSegments if not segment.category = "poi_highlight" continue for end if @@ -131,5 +135,5 @@ function PadHightlightSegment(segments as object, lengthSeconds as integer) as o segment.end = segment.end + padding end for - return segments + return skipSegments end function