mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Add skipping all segments when a non music segment exists
This commit is contained in:
@@ -41,6 +41,7 @@ interface SBConfig {
|
||||
ytInfoPermissionGranted: boolean,
|
||||
allowExpirements: boolean,
|
||||
autoHideInfoButton: boolean,
|
||||
autoSkipOnMusicVideos: boolean,
|
||||
|
||||
// What categories should be skipped
|
||||
categorySelections: CategorySelection[],
|
||||
@@ -180,6 +181,7 @@ const Config: SBObject = {
|
||||
ytInfoPermissionGranted: false,
|
||||
allowExpirements: true,
|
||||
autoHideInfoButton: true,
|
||||
autoSkipOnMusicVideos: false,
|
||||
|
||||
categorySelections: [{
|
||||
name: "sponsor",
|
||||
@@ -347,6 +349,18 @@ function migrateOldFormats(config: SBConfig) {
|
||||
chrome.storage.sync.remove("askAboutUnlistedVideos");
|
||||
}
|
||||
|
||||
if (!config["autoSkipOnMusicVideosUpdate"]) {
|
||||
config["autoSkipOnMusicVideosUpdate"] = true;
|
||||
for (const selection of config.categorySelections) {
|
||||
if (selection.name === "music_offtopic"
|
||||
&& selection.option === CategorySkipOption.AutoSkip) {
|
||||
|
||||
config.autoSkipOnMusicVideos = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Adding preview category
|
||||
if (!config["previewCategoryUpdate"]) {
|
||||
config["previewCategoryUpdate"] = true;
|
||||
|
||||
Reference in New Issue
Block a user