mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 14:37:23 +03:00
Fixed almost zero second sponsors skipping a little too late.
This commit is contained in:
@@ -597,14 +597,14 @@ function sponsorsLookup(id: string, channelIDPromise?) {
|
||||
// See if there are any starting sponsors
|
||||
let startingSponsor: number = -1;
|
||||
for (const time of sponsorTimes) {
|
||||
if (time[0] <= video.currentTime && time[0] > startingSponsor) {
|
||||
if (time[0] <= video.currentTime && time[0] > startingSponsor && time[1] > video.currentTime) {
|
||||
startingSponsor = time[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!startingSponsor) {
|
||||
for (const time of sponsorTimesSubmitting) {
|
||||
if (time[0] <= video.currentTime && time[0] > startingSponsor) {
|
||||
if (time[0] <= video.currentTime && time[0] > startingSponsor && time[1] > video.currentTime) {
|
||||
startingSponsor = time[0];
|
||||
break;
|
||||
}
|
||||
@@ -612,7 +612,7 @@ function sponsorsLookup(id: string, channelIDPromise?) {
|
||||
}
|
||||
|
||||
if (startingSponsor !== -1) {
|
||||
startSponsorSchedule(0);
|
||||
startSponsorSchedule(startingSponsor);
|
||||
} else {
|
||||
startSponsorSchedule();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user