mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 20:47:11 +03:00
Enable preview category by default for people with intermission enabled
This commit is contained in:
@@ -337,6 +337,25 @@ function fetchConfig(): Promise<void> {
|
||||
}
|
||||
|
||||
function migrateOldFormats(config: SBConfig) {
|
||||
// Adding preview category
|
||||
if (!config["previewCategoryUpdate"]) {
|
||||
config["previewCategoryUpdate"] = true;
|
||||
for (const selection of config.categorySelections) {
|
||||
if (selection.name === "intro"
|
||||
&& selection.option === CategorySkipOption.AutoSkip || selection.option === CategorySkipOption.ManualSkip) {
|
||||
|
||||
// Add a default skip option for preview category
|
||||
config.categorySelections.push({
|
||||
name: "preview",
|
||||
option: CategorySkipOption.ManualSkip
|
||||
});
|
||||
// Ensure it gets updated
|
||||
config.categorySelections = config.categorySelections;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (config["disableAutoSkip"]) {
|
||||
for (const selection of config.categorySelections) {
|
||||
if (selection.name === "sponsor") {
|
||||
|
||||
Reference in New Issue
Block a user