mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
lint
This commit is contained in:
@ -4,20 +4,18 @@ const { downloadPlaylist } = require("./back");
|
||||
const { defaultMenuDownloadLabel, getFolder, presets } = require("./utils");
|
||||
const config = require("./config");
|
||||
|
||||
let downloadLabel = defaultMenuDownloadLabel;
|
||||
|
||||
module.exports = () => {
|
||||
return [
|
||||
{
|
||||
label: downloadLabel,
|
||||
label: defaultMenuDownloadLabel,
|
||||
click: () => downloadPlaylist(),
|
||||
},
|
||||
{
|
||||
label: "Choose download folder",
|
||||
click: () => {
|
||||
let result = dialog.showOpenDialogSync({
|
||||
const result = dialog.showOpenDialogSync({
|
||||
properties: ["openDirectory", "createDirectory"],
|
||||
defaultPath: getFolder(config.get('downloadFolder')),
|
||||
defaultPath: getFolder(config.get("downloadFolder")),
|
||||
});
|
||||
if (result) {
|
||||
config.set("downloadFolder", result[0]);
|
||||
@ -29,7 +27,7 @@ module.exports = () => {
|
||||
submenu: Object.keys(presets).map((preset) => ({
|
||||
label: preset,
|
||||
type: "radio",
|
||||
checked: config.get('preset') === preset,
|
||||
checked: config.get("preset") === preset,
|
||||
click: () => {
|
||||
config.set("preset", preset);
|
||||
},
|
||||
@ -38,10 +36,10 @@ module.exports = () => {
|
||||
{
|
||||
label: "Skip existing files",
|
||||
type: "checkbox",
|
||||
checked: config.get('skipExisting'),
|
||||
checked: config.get("skipExisting"),
|
||||
click: (item) => {
|
||||
config.set("skipExisting", item.checked);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user