Skip to content

Commit eed5de9

Browse files
committed
Don't auto skip on music videos if non music category disabled
1 parent dff3bdc commit eed5de9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/content.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,7 +1959,8 @@ function shouldAutoSkip(segment: SponsorTime): boolean {
19591959

19601960
return (!getSkipProfileBool("manualSkipOnFullVideo") || !sponsorTimes?.some((s) => s.category === segment.category && s.actionType === ActionType.Full))
19611961
&& (getCategorySelection(segment)?.option === CategorySkipOption.AutoSkip ||
1962-
(getSkipProfileBool("autoSkipOnMusicVideos") && canSkipNonMusic && sponsorTimes?.some((s) => s.category === "music_offtopic")
1962+
(getSkipProfileBool("autoSkipOnMusicVideos") && canSkipNonMusic
1963+
&& sponsorTimes?.some((s) => s.category === "music_offtopic" && getCategorySelection(segment)?.option === CategorySkipOption.AutoSkip)
19631964
&& segment.actionType === ActionType.Skip)
19641965
|| sponsorTimesSubmitting.some((s) => s.segment === segment.segment))
19651966
|| isLoopedChapter(segment);
@@ -1968,7 +1969,8 @@ function shouldAutoSkip(segment: SponsorTime): boolean {
19681969
function shouldSkip(segment: SponsorTime): boolean {
19691970
return segment.hidden === SponsorHideType.Visible && (segment.actionType !== ActionType.Full
19701971
&& getCategorySelection(segment)?.option > CategorySkipOption.ShowOverlay)
1971-
|| (getSkipProfileBool("autoSkipOnMusicVideos") && sponsorTimes?.some((s) => s.category === "music_offtopic")
1972+
|| (getSkipProfileBool("autoSkipOnMusicVideos")
1973+
&& sponsorTimes?.some((s) => s.category === "music_offtopic" && getCategorySelection(segment)?.option === CategorySkipOption.AutoSkip)
19721974
&& segment.actionType === ActionType.Skip)
19731975
|| isLoopedChapter(segment);
19741976
}

0 commit comments

Comments
 (0)