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
|
return option = SponsorBlock.SegmentAction.AutoSkip or option = SponsorBlock.SegmentAction.ManualSkip
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function PadHightlightSegment(segments as object, lengthSeconds as integer) as object
|
function PadHightlightSegment(skipSegments as object, lengthSeconds as integer) as object
|
||||||
for each segment in segments
|
if skipSegments = invalid
|
||||||
|
return invalid
|
||||||
|
end if
|
||||||
|
|
||||||
|
for each segment in skipSegments
|
||||||
if not segment.category = "poi_highlight"
|
if not segment.category = "poi_highlight"
|
||||||
continue for
|
continue for
|
||||||
end if
|
end if
|
||||||
@@ -131,5 +135,5 @@ function PadHightlightSegment(segments as object, lengthSeconds as integer) as o
|
|||||||
segment.end = segment.end + padding
|
segment.end = segment.end + padding
|
||||||
end for
|
end for
|
||||||
|
|
||||||
return segments
|
return skipSegments
|
||||||
end function
|
end function
|
||||||
Reference in new issue
Block a user