From 87d1522c41580bb902447f762527df5e71ea3a2f Mon Sep 17 00:00:00 2001 From: caneleex Date: Fri, 18 Nov 2022 20:50:05 +0100 Subject: [PATCH 1/2] Don't include mutes in time without skips --- src/content.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content.ts b/src/content.ts index eb7422a8..e6f758b5 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1396,12 +1396,12 @@ function updatePreviewBar(): void { if (Config.config.showTimeWithSkips) { const skippedDuration = utils.getTimestampsDuration(previewBarSegments - .filter(({actionType}) => actionType !== ActionType.Chapter) + .filter(({actionType}) => ![ActionType.Mute, ActionType.Chapter].includes(actionType)) .map(({segment}) => segment)); showTimeWithoutSkips(skippedDuration); } - + // Update last video id lastPreviewBarUpdate = sponsorVideoID; } From b696902124ab3202fb9adf7b7480753b44a55c7d Mon Sep 17 00:00:00 2001 From: caneleex Date: Fri, 18 Nov 2022 20:51:11 +0100 Subject: [PATCH 2/2] why --- src/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index e6f758b5..8b10858d 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1401,7 +1401,7 @@ function updatePreviewBar(): void { showTimeWithoutSkips(skippedDuration); } - + // Update last video id lastPreviewBarUpdate = sponsorVideoID; }