mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 03:11:46 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 467171a17e | |||
| 3022facbea | |||
| a67bf5ea43 | |||
| 3a1a3d4241 | |||
| 9197f4a0e1 | |||
| d21220693b | |||
| 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.2",
|
||||||
"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",
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
const { existsSync, promises, unlinkSync } = require("fs"); // used for caching
|
const { promises } = require("fs"); // used for caching
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
const { ElectronBlocker } = require("@cliqz/adblocker-electron");
|
const { ElectronBlocker } = require("@cliqz/adblocker-electron");
|
||||||
@ -13,17 +13,15 @@ const loadAdBlockerEngine = (
|
|||||||
cache = true,
|
cache = true,
|
||||||
additionalBlockLists = []
|
additionalBlockLists = []
|
||||||
) => {
|
) => {
|
||||||
const adBlockerCache = path.resolve(__dirname, "ad-blocker-engine.bin");
|
// Only use cache if no additional blocklists are passed
|
||||||
if (!cache && existsSync(adBlockerCache)) {
|
const cachingOptions =
|
||||||
unlinkSync(adBlockerCache);
|
cache && additionalBlockLists.length === 0
|
||||||
}
|
? {
|
||||||
const cachingOptions = cache
|
path: path.resolve(__dirname, "ad-blocker-engine.bin"),
|
||||||
? {
|
read: promises.readFile,
|
||||||
path: adBlockerCache,
|
write: promises.writeFile,
|
||||||
read: promises.readFile,
|
}
|
||||||
write: promises.writeFile,
|
: undefined;
|
||||||
}
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
ElectronBlocker.fromLists(
|
ElectronBlocker.fromLists(
|
||||||
fetch,
|
fetch,
|
||||||
|
|||||||
19
readme.md
19
readme.md
@ -1,11 +1,16 @@
|
|||||||
# YouTube Music
|
# YouTube Music
|
||||||
|
|
||||||
[](https://GitHub.com/th-ch/youtube-music/releases/)
|
<div align="center">
|
||||||
[](https://github.com/th-ch/youtube-music/blob/master/LICENSE)
|
|
||||||
[](https://github.com/sindresorhus/xo)
|
[](https://github.com/th-ch/youtube-music/releases/)
|
||||||
[](https://GitHub.com/th-ch/youtube-music/releases/)
|
[](https://github.com/th-ch/youtube-music/blob/master/LICENSE)
|
||||||
[](https://snyk.io/test/github/th-ch/youtube-music)
|
[](https://github.com/sindresorhus/xo)
|
||||||

|
[](https://GitHub.com/th-ch/youtube-music/releases/)
|
||||||
|
[](https://snyk.io/test/github/th-ch/youtube-music)
|
||||||
|
[](https://GitHub.com/th-ch/youtube-music/releases/)
|
||||||
|
[](https://aur.archlinux.org/packages/youtube-music-bin)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -18,7 +23,7 @@
|
|||||||
|
|
||||||
You can check out the [latest release](https://github.com/th-ch/youtube-music/releases/latest) to quickly find the latest version.
|
You can check out the [latest release](https://github.com/th-ch/youtube-music/releases/latest) to quickly find the latest version.
|
||||||
|
|
||||||
**Arch Linux**
|
### Arch Linux
|
||||||
|
|
||||||
Install the `youtube-music-bin` package from the AUR. For AUR installation instructions, take a look at this [wiki page](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages).
|
Install the `youtube-music-bin` package from the AUR. For AUR installation instructions, take a look at this [wiki page](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user