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
+2
@@ -8,11 +8,13 @@ function TaskMain()
barPath = invalid barPath = invalid
skipSegments = [] skipSegments = []
if sponsorBlockResponse <> invalid
for each segment in sponsorBlockResponse for each segment in sponsorBlockResponse
if segment.videoDuration > 0 if segment.videoDuration > 0
skipSegments.push(segment) skipSegments.push(segment)
end if end if
end for end for
end if
if skipSegments.Count() = 0 if skipSegments.Count() = 0
skipSegments = invalid skipSegments = invalid