mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Merge pull request #1707 from mini-bomba/fix-videoid-mismatch-error
Fix the incorrectVideoCheck() error showing the same videoID as recorded & actual
This commit is contained in:
@@ -766,12 +766,13 @@ function inMuteSegment(currentTime: number, includeOverlap: boolean): boolean {
|
|||||||
*/
|
*/
|
||||||
function incorrectVideoCheck(videoID?: string, sponsorTime?: SponsorTime): boolean {
|
function incorrectVideoCheck(videoID?: string, sponsorTime?: SponsorTime): boolean {
|
||||||
const currentVideoID = getYouTubeVideoID();
|
const currentVideoID = getYouTubeVideoID();
|
||||||
if (currentVideoID !== (videoID || getVideoID()) || (sponsorTime
|
const recordedVideoID = videoID || getVideoID();
|
||||||
|
if (currentVideoID !== recordedVideoID || (sponsorTime
|
||||||
&& (!sponsorTimes || !sponsorTimes?.some((time) => time.segment === sponsorTime.segment))
|
&& (!sponsorTimes || !sponsorTimes?.some((time) => time.segment === sponsorTime.segment))
|
||||||
&& !sponsorTimesSubmitting.some((time) => time.segment === sponsorTime.segment))) {
|
&& !sponsorTimesSubmitting.some((time) => time.segment === sponsorTime.segment))) {
|
||||||
// Something has really gone wrong
|
// 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] 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
|
// Video ID change occured
|
||||||
checkVideoIDChange();
|
checkVideoIDChange();
|
||||||
|
|||||||
Reference in New Issue
Block a user