diff --git a/maze-utils b/maze-utils index b22477a8..81b41498 160000 --- a/maze-utils +++ b/maze-utils @@ -1 +1 @@ -Subproject commit b22477a8640b407910b24d5bec13d0d6d4d3cf01 +Subproject commit 81b414988814f5735ac6fb621e95537680bdf42d diff --git a/public/_locales b/public/_locales index e9efadcf..e3997068 160000 --- a/public/_locales +++ b/public/_locales @@ -1 +1 @@ -Subproject commit e9efadcf82316b358e3f81cba71b20d7ed1ead86 +Subproject commit e399706837d1415c9875c4fba8044b204923324d diff --git a/src/components/options/CategorySkipOptionsComponent.tsx b/src/components/options/CategorySkipOptionsComponent.tsx index 99c4e973..d865abb2 100644 --- a/src/components/options/CategorySkipOptionsComponent.tsx +++ b/src/components/options/CategorySkipOptionsComponent.tsx @@ -243,6 +243,9 @@ class CategorySkipOptionsComponent extends React.Component void, image } 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.Skip) - || sponsorTimesSubmitting.some((s) => s.segment === segment.segment)); + if (Config.config.manualSkipOnFullVideo && !sponsorTimes?.some((s) => s.category === segment.category && s.actionType === ActionType.Full)) { + return false; + } + + return ( // Normal skip + utils.getCategorySelection(segment.category)?.option === CategorySkipOption.AutoSkip + // Forbid skipping of non-music if we are not on Youtube Music + && !(segment.category === "music_offtopic" && Config.config.skipNonMusicOnlyOnYoutubeMusic && !isOnYouTubeMusic()) + ) + || + ( // Skip every segment, if it's a music video + + // Forbid autoSkipOnMusicVideos if if we are not on Youtube Music + !(Config.config.skipNonMusicOnlyOnYoutubeMusic && !isOnYouTubeMusic()) + && Config.config.autoSkipOnMusicVideos + && sponsorTimes?.some((s) => s.category === "music_offtopic") + && segment.actionType === ActionType.Skip + ) + || + sponsorTimesSubmitting.some((s) => s.segment === segment.segment); } function shouldSkip(segment: SponsorTime): boolean { - return (segment.actionType !== ActionType.Full - && segment.source !== SponsorSourceType.YouTube + if (segment.actionType === ActionType.Full) { + return false; + } + return (segment.source !== SponsorSourceType.YouTube && utils.getCategorySelection(segment.category)?.option !== CategorySkipOption.ShowOverlay) || (Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic") && segment.actionType === ActionType.Skip);