Add plugin options in migration

This commit is contained in:
TC
2020-12-03 20:26:15 +01:00
parent b94d0d4e8b
commit 4dcbd2e7f0

View File

@ -1,4 +1,3 @@
const { dialog } = require("electron");
const Store = require("electron-store");
const defaults = require("./defaults");
@ -11,9 +10,22 @@ const migrations = {
return;
}
const plugins = {};
// Include custom options
const plugins = {
adblocker: {
enabled: true,
cache: true,
additionalBlockLists: [],
},
downloader: {
enabled: false,
ffmpegArgs: [], // e.g. ["-b:a", "192k"] for an audio bitrate of 192kb/s
downloadFolder: undefined, // Custom download folder (absolute path)
},
};
enabledPlugins.forEach((enabledPlugin) => {
plugins[enabledPlugin] = {
...plugins[enabledPlugin],
enabled: true,
};
});