Fix small bug with sponsorblock task
This commit is contained in:
1 parent
1eeaced04b
commit
51d63d2019
1 file changed
+7
-3
@@ -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
|
||||
Reference in new issue
Block a user