diff options
author | Ajay <[email protected]> | 2023-03-18 21:30:33 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2023-03-18 21:30:33 -0400 |
commit | f00b3abbe47da55a71c33c9d9c9d1c7c168716bd (patch) | |
tree | d7e437a3f8f2edf744f910c55f2fad0c7adca7b9 /src | |
parent | 2f68a66f1369c8b876ad4e07ce7f4acf50f516c5 (diff) | |
download | SponsorBlock-f00b3abbe47da55a71c33c9d9c9d1c7c168716bd.tar.gz SponsorBlock-f00b3abbe47da55a71c33c9d9c9d1c7c168716bd.zip |
Enable chapter by default
Diffstat (limited to 'src')
-rw-r--r-- | src/config.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/config.ts b/src/config.ts index 6c3c98e4..f63abc80 100644 --- a/src/config.ts +++ b/src/config.ts @@ -145,6 +145,19 @@ class ConfigClass extends ProtoConfig<SBConfig, SBStorage> { } function migrateOldSyncFormats(config: SBConfig) { + if (!config["chapterCategoryAdded"]) { + config["chapterCategoryAdded"] = true; + + if (!config.categorySelections.some((s) => s.name === "chapter")) { + config.categorySelections.push({ + name: "chapter" as Category, + option: CategorySkipOption.ShowOverlay + }); + + config.categorySelections = config.categorySelections; + } + } + if (config["segmentTimes"]) { const unsubmittedSegments = {}; for (const item of config["segmentTimes"]) { @@ -325,6 +338,9 @@ const syncDefaults = { }, { name: "exclusive_access" as Category, option: CategorySkipOption.ShowOverlay + }, { + name: "chapter" as Category, + option: CategorySkipOption.ShowOverlay }], payments: { |