mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Fixed almost zero second sponsors skipping a little too late.
This commit is contained in:
parent
e62d46f2dd
commit
0d33794636
1 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue