aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormini-bomba <[email protected]>2023-03-24 19:18:00 +0100
committermini-bomba <[email protected]>2023-03-24 19:18:00 +0100
commit356ce5a6f33b25cf7caf047337e4737dc8c7c4cc (patch)
tree1ff47ba20dec470048230ae2731c8cc960bb7aa2
parentc1a61b97957f912f8f0f165bd2e765bc7b2df269 (diff)
downloadSponsorBlock-356ce5a6f33b25cf7caf047337e4737dc8c7c4cc.tar.gz
SponsorBlock-356ce5a6f33b25cf7caf047337e4737dc8c7c4cc.zip
Fix the incorrectVideoCheck() error showing the same videoID as recorded & actual
-rw-r--r--src/content.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/content.ts b/src/content.ts
index 1f1315ea..2b366c3d 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -765,12 +765,13 @@ function inMuteSegment(currentTime: number, includeOverlap: boolean): boolean {
*/
function incorrectVideoCheck(videoID?: string, sponsorTime?: SponsorTime): boolean {
const currentVideoID = getYouTubeVideoID();
- if (currentVideoID !== (videoID || getVideoID()) || (sponsorTime
+ const recordedVideoID = videoID || getVideoID();
+ if (currentVideoID !== recordedVideoID || (sponsorTime
&& (!sponsorTimes || !sponsorTimes?.some((time) => time.segment === sponsorTime.segment))
&& !sponsorTimesSubmitting.some((time) => time.segment === sponsorTime.segment))) {
// Something has really gone wrong
console.error("[SponsorBlock] The videoID recorded when trying to skip is different than what it should be.");
- console.error("[SponsorBlock] VideoID recorded: " + getVideoID() + ". Actual VideoID: " + currentVideoID);
+ console.error("[SponsorBlock] VideoID recorded: " + recordedVideoID + ". Actual VideoID: " + currentVideoID);
// Video ID change occured
checkVideoIDChange();