diff options
author | Ajay <[email protected]> | 2024-11-27 12:56:24 -0500 |
---|---|---|
committer | Ajay <[email protected]> | 2024-11-27 12:56:24 -0500 |
commit | 38e6d5469fc8293fc16ea58015c06f6e7908d855 (patch) | |
tree | e8b122c9b976b006e8187266b5d4ab956bc7dd2b | |
parent | 4d868055e78c9552ff8f67ae2ecf4a12766d9a3a (diff) | |
download | SponsorBlock-38e6d5469fc8293fc16ea58015c06f6e7908d855.tar.gz SponsorBlock-38e6d5469fc8293fc16ea58015c06f6e7908d855.zip |
Fix chapters and unsubmitted segments triggering upcoming notice
-rw-r--r-- | src/content.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/content.ts b/src/content.ts index a4d5222f..6b7982f1 100644 --- a/src/content.ts +++ b/src/content.ts @@ -804,7 +804,9 @@ async function startSponsorSchedule(includeIntersectingSegments = false, current currentSkipSchedule = setTimeout(skippingFunction, offsetDelayTime); // Show the notice only if the segment hasn't already started - if (Config.config.showUpcomingNotice && getCurrentTime() < skippingSegments[0].segment[0]) { + if (Config.config.showUpcomingNotice && getCurrentTime() < skippingSegments[0].segment[0] + && !sponsorTimesSubmitting?.some((segment) => segment.segment === currentSkip.segment) + && [ActionType.Skip, ActionType.Mute].includes(skippingSegments[0].actionType)) { const maxPopupTime = 3000; const timeUntilPopup = Math.max(0, offsetDelayTime - maxPopupTime); const popupTime = Math.min(maxPopupTime, timeUntilPopup); |