diff options
Diffstat (limited to 'src/config.ts')
-rw-r--r-- | src/config.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/config.ts b/src/config.ts index 192e6416..26ae96a5 100644 --- a/src/config.ts +++ b/src/config.ts @@ -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") { |