aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2023-03-24 15:51:47 -0400
committerGitHub <[email protected]>2023-03-24 15:51:47 -0400
commit5711e70dbbfcc8697d88421bf543109d6d8d0b30 (patch)
tree981ad22a271c77211d330673b31d1626fdd47440
parent6d7953a1ca4083e533976163b6933c26bf218590 (diff)
parent356ce5a6f33b25cf7caf047337e4737dc8c7c4cc (diff)
downloadSponsorBlock-5711e70dbbfcc8697d88421bf543109d6d8d0b30.tar.gz
SponsorBlock-5711e70dbbfcc8697d88421bf543109d6d8d0b30.zip
Merge pull request #1707 from mini-bomba/fix-videoid-mismatch-error
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 e013099b..548e1eea 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -766,12 +766,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();