null check on sponsorblock response

This commit is contained in:
Brahim Hadriche committed 2022-12-04 11:51:50 -05:00
1 parent ad861d38d5
commit 3131f85653
1 file changed
+7 -5
@@ -8,11 +8,13 @@ function TaskMain()
barPath = invalid barPath = invalid
skipSegments = [] skipSegments = []
for each segment in sponsorBlockResponse if sponsorBlockResponse <> invalid
if segment.videoDuration > 0 for each segment in sponsorBlockResponse
skipSegments.push(segment) if segment.videoDuration > 0
end if skipSegments.push(segment)
end for end if
end for
end if
if skipSegments.Count() = 0 if skipSegments.Count() = 0
skipSegments = invalid skipSegments = invalid