mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 07:27:01 +03:00
Prevent failing on api errors
This commit is contained in:
@@ -212,7 +212,7 @@ async function autoModerateSubmission(apiVideoInfo: APIVideoInfo,
|
||||
return a[0] - b[0] || a[1] - b[1];
|
||||
}));
|
||||
|
||||
const videoDuration = data.lengthSeconds;
|
||||
const videoDuration = data?.lengthSeconds;
|
||||
if (videoDuration != 0) {
|
||||
let allSegmentDuration = 0;
|
||||
//sum all segment times together
|
||||
|
||||
Reference in New Issue
Block a user