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
skipSegments = []
for each segment in sponsorBlockResponse
if segment.videoDuration > 0
skipSegments.push(segment)
end if
end for
if sponsorBlockResponse <> invalid
for each segment in sponsorBlockResponse
if segment.videoDuration > 0
skipSegments.push(segment)
end if
end for
end if
if skipSegments.Count() = 0
skipSegments = invalid