diff options
author | Ajay Ramachandran <[email protected]> | 2021-08-03 15:19:29 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2021-08-03 15:19:29 -0400 |
commit | a56bba06124fb5e30139e796646f01322a9292ab (patch) | |
tree | 6c36d6875f0daf79669f8940a9df6ff3ef2fd746 /src/config.ts | |
parent | afeba5f0771e7f784a4c46010665f42933534f25 (diff) | |
download | SponsorBlock-a56bba06124fb5e30139e796646f01322a9292ab.tar.gz SponsorBlock-a56bba06124fb5e30139e796646f01322a9292ab.zip |
Add skipping all segments when a non music segment exists
Diffstat (limited to 'src/config.ts')
-rw-r--r-- | src/config.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config.ts b/src/config.ts index 6e7e4248..bc920d5a 100644 --- a/src/config.ts +++ b/src/config.ts @@ -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; |