From c5bef13ee66377a246346d8cf72313eab44d816c Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Sat, 10 Sep 2022 18:08:11 +0200 Subject: [PATCH] Don't log any errors if there are no SponsorBlock segments (#2555) --- src/renderer/store/modules/sponsorblock.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/renderer/store/modules/sponsorblock.js b/src/renderer/store/modules/sponsorblock.js index 24183078..a214dead 100644 --- a/src/renderer/store/modules/sponsorblock.js +++ b/src/renderer/store/modules/sponsorblock.js @@ -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) }) })