aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/content.ts
diff options
context:
space:
mode:
authorAjay <[email protected]>2024-02-13 21:32:23 -0500
committerAjay <[email protected]>2024-02-13 21:32:23 -0500
commit5d871d5fe76217e3f962ec464bb7d8a84d426056 (patch)
tree1f9a5a08afc1a085c3afac40a18d22b3dd5d9055 /src/content.ts
parentb7c5737a953959d1f31e881aa5ebe12f55dffb67 (diff)
downloadSponsorBlock-5d871d5fe76217e3f962ec464bb7d8a84d426056.tar.gz
SponsorBlock-5d871d5fe76217e3f962ec464bb7d8a84d426056.zip
Fix hidden mute segments sometimes still muting
Diffstat (limited to 'src/content.ts')
-rw-r--r--src/content.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/content.ts b/src/content.ts
index ee328d92..934b9d67 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -772,6 +772,7 @@ function getVirtualTime(): number {
function inMuteSegment(currentTime: number, includeOverlap: boolean): boolean {
const checkFunction = (segment) => segment.actionType === ActionType.Mute
+ && segment.hidden === SponsorHideType.Visible
&& segment.segment[0] <= currentTime
&& (segment.segment[1] > currentTime || (includeOverlap && segment.segment[1] + 0.02 > currentTime));
return sponsorTimes?.some(checkFunction) || sponsorTimesSubmitting.some(checkFunction);