mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
24 lines
576 B
JavaScript
24 lines
576 B
JavaScript
const { setOptions, setMenuOptions } = require('../../config/plugins');
|
|
const defaultConfig = require('../../config/defaults');
|
|
|
|
let config = defaultConfig.plugins['downloader'];
|
|
|
|
module.exports.init = (options) => {
|
|
config = { ...config, ...options };
|
|
};
|
|
|
|
module.exports.setAndMaybeRestart = (option, value) => {
|
|
config[option] = value;
|
|
setMenuOptions('downloader', config);
|
|
};
|
|
|
|
module.exports.set = (option, value) => {
|
|
config[option] = value;
|
|
setOptions('downloader', config);
|
|
};
|
|
|
|
module.exports.get = (option) => {
|
|
const res = config[option];
|
|
return res;
|
|
};
|