Don't log any errors if there are no SponsorBlock segments (#2555)

This commit is contained in:
absidue 2022-09-10 18:08:11 +02:00 committed by GitHub
parent 82c0e86710
commit c5bef13ee6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -24,10 +24,16 @@ const actions = {
.flatMap((result) => result.segments)
resolve(segments)
}).fail((xhr, textStatus, error) => {
// 404 means that there are no segments registered for the video
if (xhr.status === 404) {
resolve([])
return
}
console.log(xhr)
console.log(textStatus)
console.log(requestUrl)
console.log(error)
console.error(error)
reject(xhr)
})
})