Fix odd skipping behavior sometimes with auto skip on music videos

Fix #1682
This commit is contained in:
Ajay 2023-02-22 00:16:51 -05:00
parent dfbe036119
commit 069b1c1681

View file

@ -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. */