mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-12 18:04:20 +01:00
Fix odd skipping behavior sometimes with auto skip on music videos
Fix #1682
This commit is contained in:
parent
dfbe036119
commit
069b1c1681
1 changed files with 3 additions and 2 deletions
|
@ -1676,14 +1676,15 @@ function shouldAutoSkip(segment: SponsorTime): boolean {
|
||||||
return (!Config.config.manualSkipOnFullVideo || !sponsorTimes?.some((s) => s.category === segment.category && s.actionType === ActionType.Full))
|
return (!Config.config.manualSkipOnFullVideo || !sponsorTimes?.some((s) => s.category === segment.category && s.actionType === ActionType.Full))
|
||||||
&& (utils.getCategorySelection(segment.category)?.option === CategorySkipOption.AutoSkip ||
|
&& (utils.getCategorySelection(segment.category)?.option === CategorySkipOption.AutoSkip ||
|
||||||
(Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic")
|
(Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic")
|
||||||
&& segment.actionType !== ActionType.Poi));
|
&& segment.actionType === ActionType.Skip));
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldSkip(segment: SponsorTime): boolean {
|
function shouldSkip(segment: SponsorTime): boolean {
|
||||||
return (segment.actionType !== ActionType.Full
|
return (segment.actionType !== ActionType.Full
|
||||||
&& segment.source !== SponsorSourceType.YouTube
|
&& segment.source !== SponsorSourceType.YouTube
|
||||||
&& utils.getCategorySelection(segment.category)?.option !== CategorySkipOption.ShowOverlay)
|
&& 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. */
|
/** Creates any missing buttons on the YouTube player if possible. */
|
||||||
|
|
Loading…
Reference in a new issue