mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-07 03:57:06 +03:00
Let NB mod fail on any internal server error
This commit is contained in:
@@ -113,7 +113,7 @@ async function autoModerateSubmission(submission, callback) {
|
|||||||
} else {
|
} else {
|
||||||
let overlap = false;
|
let overlap = false;
|
||||||
http = await fetch("https://ai.neuralblock.app/api/getSponsorSegments?vid=" + submission.videoID);
|
http = await fetch("https://ai.neuralblock.app/api/getSponsorSegments?vid=" + submission.videoID);
|
||||||
if (http.status === 500) return false;
|
if (http.status >= 500 && http.status < 600) return false;
|
||||||
|
|
||||||
nb_predictions = await http.json();
|
nb_predictions = await http.json();
|
||||||
for (const nb_seg of nb_predictions.sponsorSegments){
|
for (const nb_seg of nb_predictions.sponsorSegments){
|
||||||
|
|||||||
Reference in New Issue
Block a user