From f00b3abbe47da55a71c33c9d9c9d1c7c168716bd Mon Sep 17 00:00:00 2001 From: Ajay Date: Sat, 18 Mar 2023 21:30:33 -0400 Subject: [PATCH] Enable chapter by default --- src/config.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 { } 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: {