mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 11:21:46 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e07cac2406 | |||
| fd97576611 |
@ -11,6 +11,7 @@ const defaultConfig = {
|
|||||||
hideMenu: false,
|
hideMenu: false,
|
||||||
startAtLogin: false,
|
startAtLogin: false,
|
||||||
disableHardwareAcceleration: false,
|
disableHardwareAcceleration: false,
|
||||||
|
restartOnConfigChanges: false,
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
// Enabled plugins
|
// Enabled plugins
|
||||||
|
|||||||
@ -13,6 +13,9 @@ module.exports = {
|
|||||||
get,
|
get,
|
||||||
set,
|
set,
|
||||||
edit: () => store.openInEditor(),
|
edit: () => store.openInEditor(),
|
||||||
watch: (cb) => store.onDidAnyChange(cb),
|
watch: (cb) => {
|
||||||
|
store.onDidChange("options", cb);
|
||||||
|
store.onDidChange("plugins", cb);
|
||||||
|
},
|
||||||
plugins,
|
plugins,
|
||||||
};
|
};
|
||||||
|
|||||||
9
index.js
9
index.js
@ -189,9 +189,12 @@ app.on("activate", () => {
|
|||||||
app.on("ready", () => {
|
app.on("ready", () => {
|
||||||
mainWindow = createMainWindow();
|
mainWindow = createMainWindow();
|
||||||
setApplicationMenu(mainWindow);
|
setApplicationMenu(mainWindow);
|
||||||
config.watch(() => {
|
if (config.get("options.restartOnConfigChanges")) {
|
||||||
setApplicationMenu(mainWindow);
|
config.watch(() => {
|
||||||
});
|
app.relaunch();
|
||||||
|
app.exit();
|
||||||
|
});
|
||||||
|
}
|
||||||
setUpTray(app, mainWindow);
|
setUpTray(app, mainWindow);
|
||||||
|
|
||||||
// Autostart at login
|
// Autostart at login
|
||||||
|
|||||||
8
menu.js
8
menu.js
@ -50,6 +50,14 @@ const mainMenuTemplate = (win) => [
|
|||||||
config.set("options.disableHardwareAcceleration", item.checked);
|
config.set("options.disableHardwareAcceleration", item.checked);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Restart on config changes",
|
||||||
|
type: "checkbox",
|
||||||
|
checked: config.get("options.restartOnConfigChanges"),
|
||||||
|
click: (item) => {
|
||||||
|
config.set("options.restartOnConfigChanges", item.checked);
|
||||||
|
},
|
||||||
|
},
|
||||||
...(is.windows() || is.linux()
|
...(is.windows() || is.linux()
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "youtube-music",
|
"name": "youtube-music",
|
||||||
"productName": "YouTube Music",
|
"productName": "YouTube Music",
|
||||||
"version": "1.7.0",
|
"version": "1.7.1",
|
||||||
"description": "YouTube Music Desktop App - including custom plugins",
|
"description": "YouTube Music Desktop App - including custom plugins",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "th-ch/youtube-music",
|
"repository": "th-ch/youtube-music",
|
||||||
|
|||||||
Reference in New Issue
Block a user