mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 13:37:04 +03:00
Add unsubmitted segments after deleting old variable
This commit is contained in:
@@ -397,11 +397,12 @@ async function fetchConfig(): Promise<void> {
|
|||||||
|
|
||||||
function migrateOldSyncFormats(config: SBConfig) {
|
function migrateOldSyncFormats(config: SBConfig) {
|
||||||
if (config["segmentTimes"]) {
|
if (config["segmentTimes"]) {
|
||||||
|
const unsubmittedSegments = {};
|
||||||
for (const item of config["segmentTimes"]) {
|
for (const item of config["segmentTimes"]) {
|
||||||
config.unsubmittedSegments[item[0]] = item[1];
|
unsubmittedSegments[item[0]] = item[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
chrome.storage.sync.remove("segmentTimes");
|
chrome.storage.sync.remove("segmentTimes", () => config.unsubmittedSegments = unsubmittedSegments);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!config["exclusive_accessCategoryAdded"] && !config.categorySelections.some((s) => s.name === "exclusive_access")) {
|
if (!config["exclusive_accessCategoryAdded"] && !config.categorySelections.some((s) => s.name === "exclusive_access")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user