From 069b1c16812b5a0af75ca264397eabcf98c045c6 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 22 Feb 2023 00:16:51 -0500 Subject: [PATCH] Fix odd skipping behavior sometimes with auto skip on music videos Fix #1682 --- src/content.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content.ts b/src/content.ts index 85ee317f..00e31873 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1676,14 +1676,15 @@ function shouldAutoSkip(segment: SponsorTime): boolean { return (!Config.config.manualSkipOnFullVideo || !sponsorTimes?.some((s) => s.category === segment.category && s.actionType === ActionType.Full)) && (utils.getCategorySelection(segment.category)?.option === CategorySkipOption.AutoSkip || (Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic") - && segment.actionType !== ActionType.Poi)); + && segment.actionType === ActionType.Skip)); } function shouldSkip(segment: SponsorTime): boolean { return (segment.actionType !== ActionType.Full && segment.source !== SponsorSourceType.YouTube && utils.getCategorySelection(segment.category)?.option !== CategorySkipOption.ShowOverlay) - || (Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic")); + || (Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic") + && segment.actionType === ActionType.Skip); } /** Creates any missing buttons on the YouTube player if possible. */