null check on sponsorblock response
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user