From 170e2a696e724c8d3bcb92e6475554782df589c6 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Wed, 27 Sep 2023 17:13:51 +0900 Subject: [PATCH 01/94] cherry-picked: Fixed canvas injected at the wrong position Co-authored-by: MiepHD <63968466+MiepHD@users.noreply.github.com> --- plugins/visualizer/empty-player.css | 12 ++++-------- plugins/visualizer/front.ts | 4 +--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/plugins/visualizer/empty-player.css b/plugins/visualizer/empty-player.css index 15b4043b..d7d112d8 100644 --- a/plugins/visualizer/empty-player.css +++ b/plugins/visualizer/empty-player.css @@ -1,9 +1,5 @@ -#player { - margin: 0 !important; - background: black; -} - -#song-image, -#song-video { - display: none !important; +#visualizer { + position: absolute; + z-index: 1; + background-color: black; } diff --git a/plugins/visualizer/front.ts b/plugins/visualizer/front.ts index 9274a3cd..1b91cee0 100644 --- a/plugins/visualizer/front.ts +++ b/plugins/visualizer/front.ts @@ -33,9 +33,7 @@ export default (options: ConfigType<'visualizer'>) => { if (!canvas) { canvas = document.createElement('canvas'); canvas.id = 'visualizer'; - canvas.style.position = 'absolute'; - canvas.style.background = 'black'; - visualizerContainer.append(canvas); + visualizerContainer.prepend(canvas); } const resizeCanvas = () => { From 6bb33453c78e47d3a1cfbbf0ae70a470430ce3ed Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Wed, 27 Sep 2023 18:19:23 +0900 Subject: [PATCH 02/94] feat: Album Color Theme plugin Co-authored-by: EdiBOI25 <86252338+EdiBOI25@users.noreply.github.com> --- package-lock.json | 305 ++++++++++++++++++++++++++-- package.json | 1 + plugins/album-color-theme/back.ts | 39 ++++ plugins/album-color-theme/front.ts | 113 +++++++++++ plugins/album-color-theme/style.css | 29 +++ plugins/in-app-menu/front.ts | 12 ++ 6 files changed, 483 insertions(+), 16 deletions(-) create mode 100644 plugins/album-color-theme/back.ts create mode 100644 plugins/album-color-theme/front.ts create mode 100644 plugins/album-color-theme/style.css diff --git a/package-lock.json b/package-lock.json index 97349acf..2191eba0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "electron-store": "8.1.0", "electron-unhandled": "4.0.1", "electron-updater": "6.1.4", + "fast-average-color-node": "2.6.0", "filenamify": "4.3.0", "howler": "2.2.4", "html-to-text": "9.0.5", @@ -2350,7 +2351,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -2384,6 +2384,16 @@ "file-uri-to-path": "1.0.0" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -2442,7 +2452,6 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, "funding": [ { "type": "github", @@ -2457,7 +2466,6 @@ "url": "https://feross.org/support" } ], - "optional": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -2903,11 +2911,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -2918,8 +2937,16 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } }, "node_modules/color-support": { "version": "1.1.3", @@ -3302,6 +3329,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -3441,6 +3476,14 @@ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "engines": { + "node": ">=8" + } + }, "node_modules/detect-node": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", @@ -4567,6 +4610,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "engines": { + "node": ">=6" + } + }, "node_modules/exponential-backoff": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", @@ -4602,6 +4653,27 @@ ], "optional": true }, + "node_modules/fast-average-color": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/fast-average-color/-/fast-average-color-9.4.0.tgz", + "integrity": "sha512-bvM8vV6YwK07dPbzFz77zJaBcfF6ABVfgNwaxVgXc2G+o0e/tzLCF9WU8Ryp1r0Nkk6JuJNsWCzbb4cLOMlB+Q==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/fast-average-color-node": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/fast-average-color-node/-/fast-average-color-node-2.6.0.tgz", + "integrity": "sha512-dn7ps7AhcsO8Gq4468aAeSVMtYWAGjTIjQ6J83+QueA6UYZ22YeKfIrfKjQiYAjBt+oBWskZ5e1fXtmsm24xMg==", + "dependencies": { + "fast-average-color": "^9.3.0", + "node-fetch": "^2.6.7", + "sharp": "^0.31.3" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4843,6 +4915,11 @@ "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==" }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -5000,6 +5077,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -5471,7 +5553,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, "funding": [ { "type": "github", @@ -5485,8 +5566,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "optional": true + ] }, "node_modules/ignore": { "version": "5.2.4", @@ -5553,8 +5633,12 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "node_modules/internal-slot": { "version": "1.0.5", @@ -6527,7 +6611,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6714,6 +6797,11 @@ "node": ">=10" } }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, "node_modules/mpris-service": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/mpris-service/-/mpris-service-2.1.2.tgz", @@ -6735,6 +6823,11 @@ "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", "optional": true }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -6756,6 +6849,17 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/node-abi": { + "version": "3.47.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.47.0.tgz", + "integrity": "sha512-2s6B2CWZM//kPgwnuI0KrYwNjfdByE25zvAaEpq9IH4zcNsarH8Ihu/UuX6XMPEogDAxkuUFeZn60pXNHAqn3A==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/node-addon-api": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", @@ -7424,6 +7528,31 @@ "node": ">=10.4.0" } }, + "node_modules/prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -7541,6 +7670,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/read-config-file": { "version": "6.3.2", "resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-6.3.2.tgz", @@ -7621,7 +7772,6 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -8031,6 +8181,33 @@ "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", "dev": true }, + "node_modules/sharp": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.3.tgz", + "integrity": "sha512-XcR4+FCLBFKw1bdB+GEhnUNXNXvnt0tDo4WsBsraKymuo/IAuPuCBVAL2wIkUw2r/dwFW5Q5+g66Kwl2dgDFVg==", + "hasInstallScript": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.1", + "node-addon-api": "^5.0.0", + "prebuild-install": "^7.1.1", + "semver": "^7.3.8", + "simple-get": "^4.0.1", + "tar-fs": "^2.1.1", + "tunnel-agent": "^0.6.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/sharp/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -8072,6 +8249,62 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, "node_modules/simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", @@ -8277,7 +8510,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -8516,6 +8748,37 @@ "node": ">=10" } }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/tar/node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -8791,6 +9054,17 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -9020,8 +9294,7 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/uuid": { "version": "3.4.0", diff --git a/package.json b/package.json index d0e3dad5..0fc0a5dd 100644 --- a/package.json +++ b/package.json @@ -150,6 +150,7 @@ "electron-store": "8.1.0", "electron-unhandled": "4.0.1", "electron-updater": "6.1.4", + "fast-average-color-node": "2.6.0", "filenamify": "4.3.0", "howler": "2.2.4", "html-to-text": "9.0.5", diff --git a/plugins/album-color-theme/back.ts b/plugins/album-color-theme/back.ts new file mode 100644 index 00000000..04c254b3 --- /dev/null +++ b/plugins/album-color-theme/back.ts @@ -0,0 +1,39 @@ +import path from 'node:path'; + +import { getAverageColor } from 'fast-average-color-node'; +import { BrowserWindow } from 'electron'; + +import { injectCSS } from '../utils'; +import registerCallback from '../../providers/song-info'; + + +export default (win: BrowserWindow) => { + injectCSS(win.webContents, path.join(__dirname, 'style.css')); + + registerCallback((songInfo) => { + const songTitle = songInfo.title; + const songImage = songInfo.imageSrc; + + if (songImage && songTitle) { + getAverageColor(songImage) + .then((color) => { + //div.style.backgroundColor = color.rgba; + //console.log('Average color', color); + if (color.hex === '#000000') { + color.rgb = 'rgb(238,238,238)'; + color.isDark = false; + color.isLight = true; + } else if (color.hex === '#ffffff') { + color.rgb = 'rgb(0,0,0)'; + color.isDark = true; + color.isLight = false; + } + win.webContents.send('album-color-changed', color); + }) + .catch((e) => { + console.error(e); + }); + } + }); + +}; diff --git a/plugins/album-color-theme/front.ts b/plugins/album-color-theme/front.ts new file mode 100644 index 00000000..29b3fd0e --- /dev/null +++ b/plugins/album-color-theme/front.ts @@ -0,0 +1,113 @@ +import { ipcRenderer } from 'electron'; + +import type { FastAverageColorResult } from 'fast-average-color'; + +function hexToHSL(H: string) { + // Convert hex to RGB first + let r = 0; + let g = 0; + let b = 0; + if (H.length == 4) { + r = Number('0x' + H[1] + H[1]); + g = Number('0x' + H[2] + H[2]); + b = Number('0x' + H[3] + H[3]); + } else if (H.length == 7) { + r = Number('0x' + H[1] + H[2]); + g = Number('0x' + H[3] + H[4]); + b = Number('0x' + H[5] + H[6]); + } + // Then to HSL + r /= 255; + g /= 255; + b /= 255; + const cmin = Math.min(r, g, b); + const cmax = Math.max(r, g, b); + const delta = cmax - cmin; + let h: number; + let s: number; + let l: number; + + if (delta == 0) { + h = 0; + } else if (cmax == r) { + h = ((g - b) / delta) % 6; + } else if (cmax == g) { + h = ((b - r) / delta) + 2; + } else { + h = ((r - g) / delta) + 4; + } + + h = Math.round(h * 60); + + if (h < 0) { + h += 360; + } + + l = (cmax + cmin) / 2; + s = delta == 0 ? 0 : delta / (1 - Math.abs((2 * l) - 1)); + s = +(s * 100).toFixed(1); + l = +(l * 100).toFixed(1); + + //return "hsl(" + h + "," + s + "%," + l + "%)"; + return [h,s,l]; +} + +// updated elements +const playerPage = document.querySelector('#player-page'); +const navBarBackground = document.querySelector('#nav-bar-background'); +const ytmusicPlayerBar = document.querySelector('ytmusic-player-bar'); +const playerBarBackground = document.querySelector('#player-bar-background'); +const sidebarBig = document.querySelector('#guide-wrapper'); +const sidebarSmall = document.querySelector('#mini-guide-background'); +const ytmusicAppLayout = document.querySelector('#layout'); + +let hue = 0; +let saturation = 0; +let lightness = 0; + +function changeElementColor(element: HTMLElement | null, hue: number, saturation: number, lightness: number){ + if (element) { + element.style.backgroundColor = `hsl(${hue}, ${saturation}%, ${lightness}%)`; + } +} + +export default () => { + const observer = new MutationObserver((mutationsList) => { + for (const mutation of mutationsList) { + if (mutation.type === 'attributes') { + const isPageOpen = ytmusicAppLayout?.hasAttribute('player-page-open'); + if (isPageOpen) { + changeElementColor(sidebarSmall, hue, saturation, 30); + } else { + if (sidebarSmall) { + sidebarSmall.style.backgroundColor = 'black'; + } + } + } + } + }); + + if (playerPage) { + observer.observe(playerPage, { attributes: true }); + } + + ipcRenderer.on('album-color-changed', (_, albumColor: FastAverageColorResult) => { + if (albumColor) { + [hue, saturation, lightness] = hexToHSL(albumColor.hex); + changeElementColor(playerPage, hue, saturation, 30); + changeElementColor(navBarBackground, hue, saturation, 15); + changeElementColor(ytmusicPlayerBar, hue, saturation, 15); + changeElementColor(playerBarBackground, hue, saturation, 15); + changeElementColor(sidebarBig, hue, saturation, 15); + if (ytmusicAppLayout?.hasAttribute('player-page-open')) { + changeElementColor(sidebarSmall, hue, saturation, 30); + } + const ytRightClickList = document.querySelector('tp-yt-paper-listbox'); + changeElementColor(ytRightClickList, hue, saturation, 15); + } else { + if (playerPage) { + playerPage.style.backgroundColor = '#000000'; + } + } + }); +}; diff --git a/plugins/album-color-theme/style.css b/plugins/album-color-theme/style.css new file mode 100644 index 00000000..83fe51bc --- /dev/null +++ b/plugins/album-color-theme/style.css @@ -0,0 +1,29 @@ +yt-page-navigation-progress { + --yt-page-navigation-container-color: #00000046 !important; + --yt-page-navigation-progress-color: white !important; +} + +#player-page { + transition: transform 300ms,background-color 300ms cubic-bezier(0.2,0,0.6,1) !important; +} + +#nav-bar-background { + transition: opacity 200ms,background-color 300ms cubic-bezier(0.2,0,0.6,1) !important; +} + +#mini-guide-background { + transition: opacity 200ms,background-color 300ms cubic-bezier(0.2,0,0.6,1) !important; + border-right: 0px !important; +} + +#guide-wrapper { + transition: opacity 200ms,background-color 300ms cubic-bezier(0.2,0,0.6,1) !important; +} + +#img, #player, .song-media-controls.style-scope.ytmusic-player { + border-radius: 2% !important; +} + +#items { + border-radius: 10px !important; +} diff --git a/plugins/in-app-menu/front.ts b/plugins/in-app-menu/front.ts index ae5179c2..a393fdc1 100644 --- a/plugins/in-app-menu/front.ts +++ b/plugins/in-app-menu/front.ts @@ -5,6 +5,8 @@ import { Color, Titlebar } from 'custom-electron-titlebar'; import config from '../../config'; import { isEnabled } from '../../config/plugins'; +import type { FastAverageColorResult } from 'fast-average-color'; + function $(selector: string) { return document.querySelector(selector); } @@ -38,6 +40,16 @@ export default () => { } }); + if (isEnabled('album-color-theme')) { + ipcRenderer.on('album-color-changed', (_, albumColor: FastAverageColorResult) => { + if (albumColor) { + bar.updateBackground(Color.fromHex(albumColor.hexa)); + } else { + bar.updateBackground(Color.fromHex('#050505')); + } + }); + } + if (isEnabled('picture-in-picture')) { ipcRenderer.on('pip-toggle', () => { bar.refreshMenu(); From 92ecf6a0b0f048308f12111554f02269a6611519 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sat, 30 Sep 2023 15:16:04 +0900 Subject: [PATCH 03/94] fix(album-color-theme): dynamic lightness --- plugins/album-color-theme/front.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/album-color-theme/front.ts b/plugins/album-color-theme/front.ts index 29b3fd0e..7854698b 100644 --- a/plugins/album-color-theme/front.ts +++ b/plugins/album-color-theme/front.ts @@ -77,7 +77,7 @@ export default () => { if (mutation.type === 'attributes') { const isPageOpen = ytmusicAppLayout?.hasAttribute('player-page-open'); if (isPageOpen) { - changeElementColor(sidebarSmall, hue, saturation, 30); + changeElementColor(sidebarSmall, hue, saturation, lightness - 25); } else { if (sidebarSmall) { sidebarSmall.style.backgroundColor = 'black'; @@ -94,16 +94,16 @@ export default () => { ipcRenderer.on('album-color-changed', (_, albumColor: FastAverageColorResult) => { if (albumColor) { [hue, saturation, lightness] = hexToHSL(albumColor.hex); - changeElementColor(playerPage, hue, saturation, 30); - changeElementColor(navBarBackground, hue, saturation, 15); - changeElementColor(ytmusicPlayerBar, hue, saturation, 15); - changeElementColor(playerBarBackground, hue, saturation, 15); - changeElementColor(sidebarBig, hue, saturation, 15); + changeElementColor(playerPage, hue, saturation, lightness - 25); + changeElementColor(navBarBackground, hue, saturation, lightness - 15); + changeElementColor(ytmusicPlayerBar, hue, saturation, lightness - 15); + changeElementColor(playerBarBackground, hue, saturation, lightness - 15); + changeElementColor(sidebarBig, hue, saturation, lightness - 15); if (ytmusicAppLayout?.hasAttribute('player-page-open')) { - changeElementColor(sidebarSmall, hue, saturation, 30); + changeElementColor(sidebarSmall, hue, saturation, lightness - 25); } const ytRightClickList = document.querySelector('tp-yt-paper-listbox'); - changeElementColor(ytRightClickList, hue, saturation, 15); + changeElementColor(ytRightClickList, hue, saturation, lightness - 15); } else { if (playerPage) { playerPage.style.backgroundColor = '#000000'; From 8fd6bdbdf3951e3e06fd93554111eec0eb437535 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sat, 30 Sep 2023 15:16:46 +0900 Subject: [PATCH 04/94] fix(album-color-theme): use 30 instead of 25 --- plugins/album-color-theme/front.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/album-color-theme/front.ts b/plugins/album-color-theme/front.ts index 7854698b..4c095baa 100644 --- a/plugins/album-color-theme/front.ts +++ b/plugins/album-color-theme/front.ts @@ -77,7 +77,7 @@ export default () => { if (mutation.type === 'attributes') { const isPageOpen = ytmusicAppLayout?.hasAttribute('player-page-open'); if (isPageOpen) { - changeElementColor(sidebarSmall, hue, saturation, lightness - 25); + changeElementColor(sidebarSmall, hue, saturation, lightness - 30); } else { if (sidebarSmall) { sidebarSmall.style.backgroundColor = 'black'; @@ -94,13 +94,13 @@ export default () => { ipcRenderer.on('album-color-changed', (_, albumColor: FastAverageColorResult) => { if (albumColor) { [hue, saturation, lightness] = hexToHSL(albumColor.hex); - changeElementColor(playerPage, hue, saturation, lightness - 25); + changeElementColor(playerPage, hue, saturation, lightness - 30); changeElementColor(navBarBackground, hue, saturation, lightness - 15); changeElementColor(ytmusicPlayerBar, hue, saturation, lightness - 15); changeElementColor(playerBarBackground, hue, saturation, lightness - 15); changeElementColor(sidebarBig, hue, saturation, lightness - 15); if (ytmusicAppLayout?.hasAttribute('player-page-open')) { - changeElementColor(sidebarSmall, hue, saturation, lightness - 25); + changeElementColor(sidebarSmall, hue, saturation, lightness - 30); } const ytRightClickList = document.querySelector('tp-yt-paper-listbox'); changeElementColor(ytRightClickList, hue, saturation, lightness - 15); From e3d41ccb95c4047bdecceaad17f3a532f54478f7 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sat, 30 Sep 2023 19:27:12 +0900 Subject: [PATCH 05/94] chore(Actions): update workflows --- .github/workflows/build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5378a66e..07a1d885 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build YouTube Music on: push: - branches: [ master ] + branches: [ custom-version ] pull_request: env: @@ -38,21 +38,21 @@ jobs: # Build and release if it's the main repository - name: Build and release on Mac - if: startsWith(matrix.os, 'macOS') && github.repository == 'th-ch/youtube-music' + if: startsWith(matrix.os, 'macOS') && github.repository == 'organization/youtube-music-next' env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | npm run release:mac - name: Build and release on Linux - if: startsWith(matrix.os, 'ubuntu') && github.repository == 'th-ch/youtube-music' + if: startsWith(matrix.os, 'ubuntu') && github.repository == 'organization/youtube-music-next' env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | npm run release:linux - name: Build and release on Windows - if: startsWith(matrix.os, 'windows') && github.repository == 'th-ch/youtube-music' + if: startsWith(matrix.os, 'windows') && github.repository == 'organization/youtube-music-next' env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | @@ -60,24 +60,24 @@ jobs: # Only build without release if it is a fork - name: Build on Mac - if: startsWith(matrix.os, 'macOS') && github.repository != 'th-ch/youtube-music' + if: startsWith(matrix.os, 'macOS') && github.repository != 'organization/youtube-music-next' run: | npm run build:mac - name: Build on Linux - if: startsWith(matrix.os, 'ubuntu') && github.repository != 'th-ch/youtube-music' + if: startsWith(matrix.os, 'ubuntu') && github.repository != 'organization/youtube-music-next' run: | npm run build:linux - name: Build on Windows - if: startsWith(matrix.os, 'windows') && github.repository != 'th-ch/youtube-music' + if: startsWith(matrix.os, 'windows') && github.repository != 'organization/youtube-music-next' run: | npm run build:win release: runs-on: ubuntu-latest name: Release YouTube Music - if: github.repository == 'th-ch/youtube-music' && github.ref == 'refs/heads/master' + if: github.repository == 'organization/youtube-music-next' && github.ref == 'refs/heads/master' needs: build steps: - uses: actions/checkout@v4 @@ -107,7 +107,7 @@ jobs: uses: cardinalby/git-get-release-action@v1 id: get_draft_release env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: latest: true draft: true @@ -117,7 +117,7 @@ jobs: if: ${{ env.VERSION_HASH == '' }} uses: irongut/EditRelease@v1.2.0 with: - token: ${{ secrets.GH_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} id: ${{ steps.get_draft_release.outputs.id }} draft: false prerelease: false @@ -125,7 +125,7 @@ jobs: name: ${{ env.VERSION_TAG }} replacebody: true body: | - See [changelog](https://github.com/th-ch/youtube-music/blob/master/changelog.md#${{ env.CHANGELOG_ANCHOR }}) for the list of updates and the full diff. + See [changelog](https://github.com/organization/youtube-music-next/blob/master/changelog.md#${{ env.CHANGELOG_ANCHOR }}) for the list of updates and the full diff. Thanks to all contributors! 🏅 From b7142000ab3d1d38f9ca9f95500ce3cb9fa4715f Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sat, 30 Sep 2023 19:28:38 +0900 Subject: [PATCH 06/94] fix: release --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07a1d885..52b5c41c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: release: runs-on: ubuntu-latest name: Release YouTube Music - if: github.repository == 'organization/youtube-music-next' && github.ref == 'refs/heads/master' + if: github.repository == 'organization/youtube-music-next' && github.ref == 'refs/heads/custom-version' needs: build steps: - uses: actions/checkout@v4 @@ -125,7 +125,7 @@ jobs: name: ${{ env.VERSION_TAG }} replacebody: true body: | - See [changelog](https://github.com/organization/youtube-music-next/blob/master/changelog.md#${{ env.CHANGELOG_ANCHOR }}) for the list of updates and the full diff. + See [changelog](https://github.com/organization/youtube-music-next/blob/custom-version/changelog.md#${{ env.CHANGELOG_ANCHOR }}) for the list of updates and the full diff. Thanks to all contributors! 🏅 From c11ec3341af0712e3c3974ccce565cc71e727e92 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sat, 30 Sep 2023 19:39:37 +0900 Subject: [PATCH 07/94] release 1.20.1 --- .github/workflows/build.yml | 6 +++--- package-lock.json | 4 ++-- package.json | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52b5c41c..dc35823f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,21 +40,21 @@ jobs: - name: Build and release on Mac if: startsWith(matrix.os, 'macOS') && github.repository == 'organization/youtube-music-next' env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | npm run release:mac - name: Build and release on Linux if: startsWith(matrix.os, 'ubuntu') && github.repository == 'organization/youtube-music-next' env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | npm run release:linux - name: Build and release on Windows if: startsWith(matrix.os, 'windows') && github.repository == 'organization/youtube-music-next' env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | npm run release:win diff --git a/package-lock.json b/package-lock.json index 27cde294..6af2a176 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "youtube-music", - "version": "1.20.0", + "version": "1.20.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "youtube-music", - "version": "1.20.0", + "version": "1.20.1", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 3741876f..5550024b 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "youtube-music", "productName": "YouTube Music", - "version": "1.20.0", + "version": "1.20.1", "description": "YouTube Music Desktop App - including custom plugins", - "main": "./dist/index.js", + "main": "dist/index.js", "license": "MIT", "repository": "th-ch/youtube-music", "author": { From 35f6064b7a4f0414d52f7a89fc3c0cff4c200f2e Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sat, 30 Sep 2023 19:47:52 +0900 Subject: [PATCH 08/94] fix(actions-linux): release --- .github/workflows/build.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc35823f..96ace06b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: pull_request: env: - NODE_VERSION: "20.x" + NODE_VERSION: "18.x" jobs: build: diff --git a/package.json b/package.json index 5550024b..d95824d9 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "YouTube Music", "version": "1.20.1", "description": "YouTube Music Desktop App - including custom plugins", - "main": "dist/index.js", + "main": "./dist/index.js", "license": "MIT", "repository": "th-ch/youtube-music", "author": { From 722462035026a72f3715960315d1ccde01704935 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sat, 30 Sep 2023 20:10:23 +0900 Subject: [PATCH 09/94] fix(actions): fix release upload --- .github/workflows/build.yml | 1 - package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96ace06b..59a38ad5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -141,4 +141,3 @@ jobs: commit_message: Update changelog for ${{ env.VERSION_TAG }} file_pattern: "changelog.md" commit_user_name: CI - commit_user_email: th-ch@users.noreply.github.com diff --git a/package.json b/package.json index a488c29f..7ed411db 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "description": "YouTube Music Desktop App - including custom plugins", "main": "./dist/index.js", "license": "MIT", - "repository": "th-ch/youtube-music", + "repository": "organization/youtube-music-next", "author": { "name": "th-ch", "email": "th-ch@users.noreply.github.com", From faaf54d0b08c0e6a6e3c0417f7e2f9ca70721fdb Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sat, 30 Sep 2023 11:22:12 +0000 Subject: [PATCH 10/94] Update changelog for v1.20.1 --- changelog.md | 1197 ++++++++++++++++---------------------------------- 1 file changed, 376 insertions(+), 821 deletions(-) diff --git a/changelog.md b/changelog.md index 55d2ecce..efea6083 100644 --- a/changelog.md +++ b/changelog.md @@ -2,824 +2,379 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. -#### [v1.20.0](https://github.com/th-ch/youtube-music/compare/v1.19.0...v1.20.0) - -- Bump version to 1.20.0 [`#1117`](https://github.com/th-ch/youtube-music/pull/1117) -- Multiple implementations for the Adblocker plugin [`#1134`](https://github.com/th-ch/youtube-music/pull/1134) -- add xesam:url mpris from songInfo.url [`#1138`](https://github.com/th-ch/youtube-music/pull/1138) -- revert adblocker bump [`#1124`](https://github.com/th-ch/youtube-music/pull/1124) -- fix security issues in dependencies [`#1116`](https://github.com/th-ch/youtube-music/pull/1116) -- commit assets/generated [`#1118`](https://github.com/th-ch/youtube-music/pull/1118) -- remove `electron.remote` dependency [`#1113`](https://github.com/th-ch/youtube-music/pull/1113) -- .gitattributes set `eol=lf` on *all* files [`#1115`](https://github.com/th-ch/youtube-music/pull/1115) -- [crossfade] add `[beta]` tag to warn of possible bugs [`#1096`](https://github.com/th-ch/youtube-music/pull/1096) -- [crossfade] add menu options [`#1065`](https://github.com/th-ch/youtube-music/pull/1065) -- [captions-selector] add `autoload` option [`#1079`](https://github.com/th-ch/youtube-music/pull/1079) -- [downloader] Cleanup metadata [`#1091`](https://github.com/th-ch/youtube-music/pull/1091) -- fix protocol handler on unix [`#1099`](https://github.com/th-ch/youtube-music/pull/1099) -- fix merge conflict mistake in #1032 [`#1090`](https://github.com/th-ch/youtube-music/pull/1090) -- Create providers/decorators.js [`#1068`](https://github.com/th-ch/youtube-music/pull/1068) -- [adblocker] fix ads showing on program start [`#1100`](https://github.com/th-ch/youtube-music/pull/1100) -- Allow downloading age restricted videos [`#1086`](https://github.com/th-ch/youtube-music/pull/1086) -- add starting page option [`#1073`](https://github.com/th-ch/youtube-music/pull/1073) -- [downloader] plugin overhaul [`#1054`](https://github.com/th-ch/youtube-music/pull/1054) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.25.2 to - 1.26.0 [`#1070`](https://github.com/th-ch/youtube-music/pull/1070) -- [in-app-menu] fix css style of the library of uploaded - songs [`#1072`](https://github.com/th-ch/youtube-music/pull/1072) -- add option to hide the like buttons [`#1077`](https://github.com/th-ch/youtube-music/pull/1077) -- Nitpick: Fix name casing in tray icon tooltip [`#1081`](https://github.com/th-ch/youtube-music/pull/1081) -- [lyrics-genius] Improved reliability of east asian language detection - #1080 [`#1082`](https://github.com/th-ch/youtube-music/pull/1082) -- Add dynamic synced plugin config provider [`#1064`](https://github.com/th-ch/youtube-music/pull/1064) -- [captions-selector] fix button showing when there aren't any captions - available [`#1063`](https://github.com/th-ch/youtube-music/pull/1063) -- [in-app-menu] fix items hidden by navbar in library [`#1067`](https://github.com/th-ch/youtube-music/pull/1067) -- Fix Youtube Music logo is draggable [`#1061`](https://github.com/th-ch/youtube-music/pull/1061) -- fix build action failing on forks, and run it on pull - requests [`#1069`](https://github.com/th-ch/youtube-music/pull/1069) -- try to fix songInfo time&album [`#1032`](https://github.com/th-ch/youtube-music/pull/1032) -- [lyrics] Romanization toggle for Genius plugin [`#1039`](https://github.com/th-ch/youtube-music/pull/1039) -- [Snyk] Upgrade html-to-text from 9.0.3 to 9.0.4 [`#1056`](https://github.com/th-ch/youtube-music/pull/1056) -- [in-app-menu] add toggle menu icon [`#988`](https://github.com/th-ch/youtube-music/pull/988) -- Fix playback speed slider not showing and PiP button showing when it - shouldn't [`#1048`](https://github.com/th-ch/youtube-music/pull/1048) -- [lyrics-genius] Fix lyrics not showing up or showing up when they - shouldn't [`#1052`](https://github.com/th-ch/youtube-music/pull/1052) -- [in-app-menu] disable nav-bar drag when menu is open [`#1055`](https://github.com/th-ch/youtube-music/pull/1055) -- [Notifications] [Windows] Native interactive notifications [`#946`](https://github.com/th-ch/youtube-music/pull/946) -- automate winget releases [`#1049`](https://github.com/th-ch/youtube-music/pull/1049) -- build win target on ARM [`#1029`](https://github.com/th-ch/youtube-music/pull/1029) -- feat: auto reconnect rpc and CSP fix [`#961`](https://github.com/th-ch/youtube-music/pull/961) -- [in-app-menu] make navbar draggable [`#989`](https://github.com/th-ch/youtube-music/pull/989) -- Add option `useNativePiP` in PiP plugin to use native PiP [`#1013`](https://github.com/th-ch/youtube-music/pull/1013) -- [PiP] fix hotkey activating when typing in the search box [`#1025`](https://github.com/th-ch/youtube-music/pull/1025) -- [PiP] Remove titlebar when in-app-menu is enabled [`#1024`](https://github.com/th-ch/youtube-music/pull/1024) -- [Shortcuts] MPRIS fixes, Repeat Language bug fix [`#1005`](https://github.com/th-ch/youtube-music/pull/1005) -- Build without release in forks [`#1023`](https://github.com/th-ch/youtube-music/pull/1023) -- [in-app-menu] fix navbar position [`#997`](https://github.com/th-ch/youtube-music/pull/997) -- Migrate to yarn v3 [`#1022`](https://github.com/th-ch/youtube-music/pull/1022) -- [precise-volume] fix arrows shortcuts active in search box [`#1002`](https://github.com/th-ch/youtube-music/pull/1002) -- [new plugin] Add first version for crossfade plugin [`#1012`](https://github.com/th-ch/youtube-music/pull/1012) -- Fix bypass-age-restriction lib import [`#984`](https://github.com/th-ch/youtube-music/pull/984) -- Add menu entry to copy current URL [`#977`](https://github.com/th-ch/youtube-music/pull/977) -- Remove deprecated code [`#979`](https://github.com/th-ch/youtube-music/pull/979) -- Update dev dependencies [`#976`](https://github.com/th-ch/youtube-music/pull/976) -- Update electron and various dependencies [`#974`](https://github.com/th-ch/youtube-music/pull/974) -- Add CI job for dependency review [`#973`](https://github.com/th-ch/youtube-music/pull/973) -- Improve captions plugin [`#972`](https://github.com/th-ch/youtube-music/pull/972) -- fix malformed json in tuna-obs [`#817`](https://github.com/th-ch/youtube-music/pull/817) -- Add Captions selector [`#866`](https://github.com/th-ch/youtube-music/pull/866) -- fix SnoreToast implementation [`#941`](https://github.com/th-ch/youtube-music/pull/941) -- Bump json5 from 1.0.1 to 1.0.2 [`#942`](https://github.com/th-ch/youtube-music/pull/942) -- [Snyk] Upgrade custom-electron-titlebar from 4.1.3 to 4.1.5 [`#969`](https://github.com/th-ch/youtube-music/pull/969) -- Fixed video-toggle aligning running before #main-panel - exists [`#956`](https://github.com/th-ch/youtube-music/pull/956) -- [New plugin] Music visualizers [`#953`](https://github.com/th-ch/youtube-music/pull/953) -- fix PiP buttons not showing up [`#964`](https://github.com/th-ch/youtube-music/pull/964) -- Use same audio context/source everywhere [`#951`](https://github.com/th-ch/youtube-music/pull/951) -- revert adblocker bump [`#1105`](https://github.com/th-ch/youtube-music/issues/1105) -- Allow downloading age restricted videos [`#1084`](https://github.com/th-ch/youtube-music/issues/1084) -- add option to hide the like buttons [`#1075`](https://github.com/th-ch/youtube-music/issues/1075) -- add starting page option [`#1071`](https://github.com/th-ch/youtube-music/issues/1071) -- add slight delay to lyrics genius [`#1041`](https://github.com/th-ch/youtube-music/issues/1041) -- fix unescaped url params [`#1050`](https://github.com/th-ch/youtube-music/issues/1050) -- fix playback speed selector [`#1045`](https://github.com/th-ch/youtube-music/issues/1045) -- fix PiP button [`#959`](https://github.com/th-ch/youtube-music/issues/959) -- fix security issues in - deps [`9cde19d`](https://github.com/th-ch/youtube-music/commit/9cde19d906081fe1851f90fa44581b2b74c328e3) -- rome lint [`325026e`](https://github.com/th-ch/youtube-music/commit/325026e3eae3daed33a6d66d1ef9f898d6805b28) -- lint [`b652a01`](https://github.com/th-ch/youtube-music/commit/b652a011a5a08978db6660aeca6908c47a7cf07a) - -#### [v1.19.0](https://github.com/th-ch/youtube-music/compare/v1.18.0...v1.19.0) - -> 31 December 2022 - -- Automatic release by CI when version is updated [`#936`](https://github.com/th-ch/youtube-music/pull/936) -- Center toggle of video-toggle [`#894`](https://github.com/th-ch/youtube-music/pull/894) -- Load plugins as soon as the window is created [`#890`](https://github.com/th-ch/youtube-music/pull/890) -- Bump qs from 6.5.2 to 6.5.3 [`#913`](https://github.com/th-ch/youtube-music/pull/913) -- [Snyk] Upgrade custom-electron-titlebar from 4.1.1 to 4.1.2 [`#900`](https://github.com/th-ch/youtube-music/pull/900) -- Add option in skip-silences plugin to only skip at the - beginning [`#931`](https://github.com/th-ch/youtube-music/pull/931) -- Replace rimraf by del-cli [`#932`](https://github.com/th-ch/youtube-music/pull/932) -- docs: Added winget install instructions [`#873`](https://github.com/th-ch/youtube-music/pull/873) -- [Snyk] Upgrade async-mutex from 0.3.2 to 0.4.0 [`#855`](https://github.com/th-ch/youtube-music/pull/855) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.25.0 to - 1.25.1 [`#856`](https://github.com/th-ch/youtube-music/pull/856) -- [Snyk] Upgrade custom-electron-titlebar from 4.1.0 to 4.1.1 [`#865`](https://github.com/th-ch/youtube-music/pull/865) -- [Snyk] Upgrade @ffmpeg/ffmpeg from 0.11.5 to 0.11.6 [`#876`](https://github.com/th-ch/youtube-music/pull/876) -- Discord Plugin RPC Fix [`#888`](https://github.com/th-ch/youtube-music/pull/888) -- Bump FFMpeg [`#854`](https://github.com/th-ch/youtube-music/pull/854) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.23.8 to - 1.23.9 [`#823`](https://github.com/th-ch/youtube-music/pull/823) -- [Snyk] Upgrade electron-store from 8.0.2 to 8.1.0 [`#801`](https://github.com/th-ch/youtube-music/pull/801) -- proposal: Adding an option to hide duration before the song - ends [`#802`](https://github.com/th-ch/youtube-music/pull/802) -- [Snyk] Security upgrade node-fetch from 2.6.7 to 3.2.10 [`#790`](https://github.com/th-ch/youtube-music/pull/790) -- Update README.md with a new theme repo [`#807`](https://github.com/th-ch/youtube-music/pull/807) -- Fix likes on touchbar (they were inverted) [`#822`](https://github.com/th-ch/youtube-music/pull/822) -- Add Scoop install directions for Windows 🪟 [`#839`](https://github.com/th-ch/youtube-music/pull/839) -- Bump version and change release type when publishing a new - version [`31ab27c`](https://github.com/th-ch/youtube-music/commit/31ab27c39ff6319116a6514d952eed1f02dd45fd) -- Lock node-fetch to v2 for - commonJS [`c9f610f`](https://github.com/th-ch/youtube-music/commit/c9f610f7fcfcce1317338364045ab0e1bf4249a4) -- fix: upgrade @cliqz/adblocker-electron from 1.25.0 to - 1.25.1 [`762ef4e`](https://github.com/th-ch/youtube-music/commit/762ef4eede29b53aae912b3b50a1ca53f6765c53) - -#### [v1.18.0](https://github.com/th-ch/youtube-music/compare/v1.17.0...v1.18.0) - -> 5 September 2022 - -- Bump ytdl-core (bug fix) [`#816`](https://github.com/th-ch/youtube-music/pull/816) -- Bump electron and fix tests in CI [`#813`](https://github.com/th-ch/youtube-music/pull/813) -- Allow user to pass custom CSS file [`#800`](https://github.com/th-ch/youtube-music/pull/800) -- [Snyk] Upgrade html-to-text from 8.2.0 to 8.2.1 [`#799`](https://github.com/th-ch/youtube-music/pull/799) -- [Snyk] Upgrade electron-store from 8.0.1 to 8.0.2 [`#772`](https://github.com/th-ch/youtube-music/pull/772) -- Bump jpeg-js from 0.4.3 to 0.4.4 [`#756`](https://github.com/th-ch/youtube-music/pull/756) -- Support MPRIS loop and volume change [`#749`](https://github.com/th-ch/youtube-music/pull/749) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.23.7 to - 1.23.8 [`#742`](https://github.com/th-ch/youtube-music/pull/742) -- Use ; instead of space for play/pause. [`#745`](https://github.com/th-ch/youtube-music/pull/745) -- Update readme.md [`#750`](https://github.com/th-ch/youtube-music/pull/750) -- fix lyrics font size [`#753`](https://github.com/th-ch/youtube-music/pull/753) -- fix top gap between nav-bar and browse-page [`#734`](https://github.com/th-ch/youtube-music/pull/734) -- migrate from remote to ipc + fix restart in portable app [`#605`](https://github.com/th-ch/youtube-music/pull/605) -- [Snyk] Upgrade custom-electron-prompt from 1.4.2 to 1.5.0 [`#717`](https://github.com/th-ch/youtube-music/pull/717) -- Picture in Picture v2 [`#685`](https://github.com/th-ch/youtube-music/pull/685) -- Add MPRIS volume control [`#776`](https://github.com/th-ch/youtube-music/issues/776) -- Remove jest [`bb6115f`](https://github.com/th-ch/youtube-music/commit/bb6115fec1a18a416edb365a442eb0b0ee330768) -- migrate from remote to - ipc [`5bd9768`](https://github.com/th-ch/youtube-music/commit/5bd97685b9e07c656e0b57a9e02819afc70af1b1) -- v3 [`d23bfe9`](https://github.com/th-ch/youtube-music/commit/d23bfe936840b947ca101fd304464f65d36e88cc) - -#### [v1.17.0](https://github.com/th-ch/youtube-music/compare/v1.16.0...v1.17.0) - -> 16 May 2022 - -- Bump ejs from 3.1.6 to 3.1.7 [`#712`](https://github.com/th-ch/youtube-music/pull/712) -- fix injectCSS `did-finish-load` listener overload [`#693`](https://github.com/th-ch/youtube-music/pull/693) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.23.6 to - 1.23.7 [`#689`](https://github.com/th-ch/youtube-music/pull/689) -- [Snyk] Upgrade custom-electron-prompt from 1.4.1 to 1.4.2 [`#686`](https://github.com/th-ch/youtube-music/pull/686) -- [Snyk] Upgrade @electron/remote from 2.0.7 to 2.0.8 [`#684`](https://github.com/th-ch/youtube-music/pull/684) -- Improve plugin submenu ux [`#699`](https://github.com/th-ch/youtube-music/pull/699) -- update build action [`#702`](https://github.com/th-ch/youtube-music/pull/702) -- add different modes to video-toggle plugin [`#700`](https://github.com/th-ch/youtube-music/pull/700) -- lint [`#701`](https://github.com/th-ch/youtube-music/pull/701) -- [ImgBot] Optimize images [`#703`](https://github.com/th-ch/youtube-music/pull/703) -- add album to lastfm if available [`#695`](https://github.com/th-ch/youtube-music/pull/695) -- [in-app-menu] add hide icon option [`#680`](https://github.com/th-ch/youtube-music/pull/680) -- Add plugin to bypass age restrictions [`#682`](https://github.com/th-ch/youtube-music/pull/682) -- Add "Picture in picture" plugin [`#674`](https://github.com/th-ch/youtube-music/pull/674) -- Set lyrics metadata from Genius [`#679`](https://github.com/th-ch/youtube-music/pull/679) -- MacOS: bring back the app in dock when using tray + app - hidden [`#677`](https://github.com/th-ch/youtube-music/pull/677) -- [Snyk] Upgrade @electron/remote from 2.0.4 to 2.0.5 [`#644`](https://github.com/th-ch/youtube-music/pull/644) -- [Snyk] Upgrade ytpl from 2.2.3 to 2.3.0 [`#660`](https://github.com/th-ch/youtube-music/pull/660) -- [Snyk] Upgrade ytdl-core from 4.10.1 to 4.11.0 [`#659`](https://github.com/th-ch/youtube-music/pull/659) -- Bump plist from 3.0.2 to 3.0.5 [`#678`](https://github.com/th-ch/youtube-music/pull/678) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.23.4 to - 1.23.5 [`#624`](https://github.com/th-ch/youtube-music/pull/624) -- [Precise-Volume] fix volumeHud position in miniplayer [`#645`](https://github.com/th-ch/youtube-music/pull/645) -- add always-on-top option [`#655`](https://github.com/th-ch/youtube-music/pull/655) -- [precise-volume] fix expand-volume-slider not updating its - value [`#670`](https://github.com/th-ch/youtube-music/pull/670) -- Fix lyrics genius missing parts [`#671`](https://github.com/th-ch/youtube-music/pull/671) -- feat: option to force show like buttons [`#673`](https://github.com/th-ch/youtube-music/pull/673) -- fix custom titlebar in prompt options [`#619`](https://github.com/th-ch/youtube-music/pull/619) -- Process lyrics HTML in Genius - util [`d0532d6`](https://github.com/th-ch/youtube-music/commit/d0532d691e56f955ef0b41f5fe2efe6295dddf9e) -- Create first version of picture in picture - plugin [`d2265b5`](https://github.com/th-ch/youtube-music/commit/d2265b59d78143cf51fe4dc3d5dee9da66873cc1) -- Bump electron-builder to fix Mac build - script [`ae8365f`](https://github.com/th-ch/youtube-music/commit/ae8365f721eafda6c502d02eee86d098f2b9e2a1) - -#### [v1.16.0](https://github.com/th-ch/youtube-music/compare/v1.15.0...v1.16.0) - -> 20 February 2022 - -- update in-app-menu [`#596`](https://github.com/th-ch/youtube-music/pull/596) -- Fix clientID [`#602`](https://github.com/th-ch/youtube-music/pull/602) -- Add snoretoast custom compile script [`#600`](https://github.com/th-ch/youtube-music/pull/600) -- fix interactive notifications icon + exclude platform specific plugins from - build [`#591`](https://github.com/th-ch/youtube-music/pull/591) -- Add album title to largeImage and change paused icon [`#587`](https://github.com/th-ch/youtube-music/pull/587) -- make useragent override optional [`#595`](https://github.com/th-ch/youtube-music/pull/595) -- get album name from DOM [`#588`](https://github.com/th-ch/youtube-music/pull/588) -- fix various lyrics issues [`#584`](https://github.com/th-ch/youtube-music/pull/584) -- discord set inactivity timeout prompt [`#580`](https://github.com/th-ch/youtube-music/pull/580) -- add single instance lock option [`#578`](https://github.com/th-ch/youtube-music/pull/578) -- fix "restart app on config change" option [`#561`](https://github.com/th-ch/youtube-music/pull/561) -- fix window position save spam [`#562`](https://github.com/th-ch/youtube-music/pull/562) -- load adblocker sooner [`#583`](https://github.com/th-ch/youtube-music/pull/583) -- add description of new plugins to readme [`#585`](https://github.com/th-ch/youtube-music/pull/585) -- Use `center` alignment for lyrics text [`#573`](https://github.com/th-ch/youtube-music/pull/573) -- fix precise-volume hud positioning [`#567`](https://github.com/th-ch/youtube-music/pull/567) -- update electron and dependencies [`#565`](https://github.com/th-ch/youtube-music/pull/565) -- filenamify playlist folder name [`#557`](https://github.com/th-ch/youtube-music/pull/557) -- [Snyk] Security upgrade node-fetch from 2.6.6 to 2.6.7 (3.1.1 - incompatible) [`#554`](https://github.com/th-ch/youtube-music/pull/554) -- fix app starting offscreen [`#548`](https://github.com/th-ch/youtube-music/pull/548) -- Release Mac arm64 [`#566`](https://github.com/th-ch/youtube-music/pull/566) -- Build command for Apple (m1) silicon macs [`#553`](https://github.com/th-ch/youtube-music/pull/553) -- [Snyk] Upgrade custom-electron-titlebar from 3.2.9 to 3.2.10 [`#545`](https://github.com/th-ch/youtube-music/pull/545) -- Fix duplicate media session on linux [`#551`](https://github.com/th-ch/youtube-music/pull/551) -- show a badge remaining items when downloading a playlist [`#550`](https://github.com/th-ch/youtube-music/pull/550) -- allow downloading playlists from popup menu [`#549`](https://github.com/th-ch/youtube-music/pull/549) -- xesam:artist should be a list [`#539`](https://github.com/th-ch/youtube-music/pull/539) -- fix notifications showing thumbnail of last song [`#537`](https://github.com/th-ch/youtube-music/pull/537) -- - -Fix https://github.com/th-ch/youtube-music/pull/578#issuecomment-1035517531 [`#578`](https://github.com/th-ch/youtube-music/pull/578) - -- Add automatic - changelog [`1d9bfe8`](https://github.com/th-ch/youtube-music/commit/1d9bfe8ac8869cde648164979986964baa52c2f9) -- update electron to - v17.0.0 [`fef7115`](https://github.com/th-ch/youtube-music/commit/fef711549fa9862f8ea23301edde747c5802e352) -- update - dependencies [`8be07bc`](https://github.com/th-ch/youtube-music/commit/8be07bcb7ad8b727d97c36aa0760aed4e2fc481f) - -#### [v1.15.0](https://github.com/th-ch/youtube-music/compare/v1.14.0...v1.15.0) - -> 30 December 2021 - -- Switch from spectron to playwright to fix tests [`#531`](https://github.com/th-ch/youtube-music/pull/531) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.23.0 to - 1.23.1 [`#529`](https://github.com/th-ch/youtube-music/pull/529) -- fix precise-volume options sync [`#525`](https://github.com/th-ch/youtube-music/pull/525) -- Add album art/thumbnail to discord activity [`#524`](https://github.com/th-ch/youtube-music/pull/524) -- fix skip-silences plugin [`#521`](https://github.com/th-ch/youtube-music/pull/521) -- [Snyk] Upgrade electron-updater from 4.6.2 to 4.6.3 [`#520`](https://github.com/th-ch/youtube-music/pull/520) -- update electron & remote & user agents [`#515`](https://github.com/th-ch/youtube-music/pull/515) -- fixes mpris bug in snap [`#513`](https://github.com/th-ch/youtube-music/pull/513) -- Add "Skip silences" plugin [`#519`](https://github.com/th-ch/youtube-music/pull/519) -- Aligned lyric design [`#510`](https://github.com/th-ch/youtube-music/pull/510) -- Fix mpris bugs - follows #480 [`#509`](https://github.com/th-ch/youtube-music/pull/509) -- Various small fixes (discord, video-toggle, precise-volume, playback-speed, shortcuts, - lyrics) [`#476`](https://github.com/th-ch/youtube-music/pull/476) -- Mpris + obs-tuna fixes [`#480`](https://github.com/th-ch/youtube-music/pull/480) -- [Snyk] Upgrade node-fetch from 2.6.5 to 2.6.6 [`#498`](https://github.com/th-ch/youtube-music/pull/498) -- fix interaction between blur navbar & in-app-menu [`#491`](https://github.com/th-ch/youtube-music/pull/491) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.22.7 to - 1.23.0 [`#475`](https://github.com/th-ch/youtube-music/pull/475) -- New Plugin: Exponential Volume [`#488`](https://github.com/th-ch/youtube-music/pull/488) -- [Snyk] Upgrade electron-updater from 4.6.0 to 4.6.1 [`#474`](https://github.com/th-ch/youtube-music/pull/474) -- Fix loadeddata/metadata video events rarely not firing (+other small - fixes) [`#477`](https://github.com/th-ch/youtube-music/pull/477) -- fix #490 [`#490`](https://github.com/th-ch/youtube-music/issues/490) -- fix #472 [`#472`](https://github.com/th-ch/youtube-music/issues/472) -- fix mpris [`ccfe743`](https://github.com/th-ch/youtube-music/commit/ccfe7434bf708ee58156c2952234a049706edfc2) -- lint [`4362101`](https://github.com/th-ch/youtube-music/commit/4362101c0a2ebb7f0536f615cecba8a55ac96702) -- rework songInfo pause - listener [`6726e26`](https://github.com/th-ch/youtube-music/commit/6726e2600b3ca3a8d68e3e1b95b50da211fa354d) - -#### [v1.14.0](https://github.com/th-ch/youtube-music/compare/v1.13.0...v1.14.0) - -> 7 November 2021 - -- [Snyk] Upgrade custom-electron-prompt from 1.1.0 to 1.2.0 [`#467`](https://github.com/th-ch/youtube-music/pull/467) -- Video Toggle Plugin [`#448`](https://github.com/th-ch/youtube-music/pull/448) -- fix playback speed plugin [`#462`](https://github.com/th-ch/youtube-music/pull/462) -- Fix sponsorblock skipping when not needed [`#465`](https://github.com/th-ch/youtube-music/pull/465) -- Sponsorblock fix + use new apiLoaded event [`#463`](https://github.com/th-ch/youtube-music/pull/463) -- use apiLoaded event in audio-compressor plugin [`#458`](https://github.com/th-ch/youtube-music/pull/458) -- alert on initial hide-menu enabled [`#456`](https://github.com/th-ch/youtube-music/pull/456) -- Blur plugin tweaks and integration with in-app-menu [`#451`](https://github.com/th-ch/youtube-music/pull/451) -- set resume on start url to songInfo.url [`#449`](https://github.com/th-ch/youtube-music/pull/449) -- quality-changer-plugin [`#446`](https://github.com/th-ch/youtube-music/pull/446) -- get songInfo from youtube API [`#443`](https://github.com/th-ch/youtube-music/pull/443) -- New plugin: Blur navigation bar [`#442`](https://github.com/th-ch/youtube-music/pull/442) -- Discord plugin: Clean Up Export (follow-up #380) [`#440`](https://github.com/th-ch/youtube-music/pull/440) -- remove upgrade button + makes images unselectable [`#434`](https://github.com/th-ch/youtube-music/pull/434) -- new auto confirm when paused [`#433`](https://github.com/th-ch/youtube-music/pull/433) -- fix: mpris instance not registering itself and media - controls [`#431`](https://github.com/th-ch/youtube-music/pull/431) -- Audio compressor plugin [`#288`](https://github.com/th-ch/youtube-music/pull/288) -- precise-volume plugin fixes & updates [`#275`](https://github.com/th-ch/youtube-music/pull/275) -- Custom Prompt for changing options [`#243`](https://github.com/th-ch/youtube-music/pull/243) -- [Snyk] Upgrade async-mutex from 0.3.1 to 0.3.2 [`#412`](https://github.com/th-ch/youtube-music/pull/412) -- build(deps): bump tmpl from 1.0.4 to 1.0.5 [`#414`](https://github.com/th-ch/youtube-music/pull/414) -- [Snyk] Upgrade node-fetch from 2.6.1 to 2.6.2 [`#416`](https://github.com/th-ch/youtube-music/pull/416) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.22.5 to - 1.22.6 [`#429`](https://github.com/th-ch/youtube-music/pull/429) -- build(deps-dev): bump electron from 12.0.8 to 12.1.0 [`#430`](https://github.com/th-ch/youtube-music/pull/430) -- Fix discord clearActivity, menu, listen along option [`#380`](https://github.com/th-ch/youtube-music/pull/380) -- Bump dev deps [`41a01ba`](https://github.com/th-ch/youtube-music/commit/41a01ba58a17056ba5143fdbd10d3bae11dd8d52) -- Discord add reconnecting - functionality [`b5fd6b4`](https://github.com/th-ch/youtube-music/commit/b5fd6b4969a318b3738583e7f33eb2c0cf295237) -- add - custom-electron-prompt [`e4eed2e`](https://github.com/th-ch/youtube-music/commit/e4eed2e51979378e62dab902e425218cae5108dc) - -#### [v1.13.0](https://github.com/th-ch/youtube-music/compare/v1.12.2...v1.13.0) - -> 19 September 2021 - -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.22.4 to - 1.22.5 [`#406`](https://github.com/th-ch/youtube-music/pull/406) -- Fix incorrect Google alert caused by changing user agent coresponding to current - platform [`#384`](https://github.com/th-ch/youtube-music/pull/384) -- [Snyk] Upgrade electron-updater from 4.4.3 to 4.4.6 [`#401`](https://github.com/th-ch/youtube-music/pull/401) -- [Snyk] Upgrade electron-updater from 4.4.0 to 4.4.1 [`#370`](https://github.com/th-ch/youtube-music/pull/370) -- Bump path-parse from 1.0.6 to 1.0.7 [`#375`](https://github.com/th-ch/youtube-music/pull/375) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.22.2 to - 1.22.3 [`#385`](https://github.com/th-ch/youtube-music/pull/385) -- Bump jszip from 3.5.0 to 3.7.1 [`#388`](https://github.com/th-ch/youtube-music/pull/388) -- List missing plugins [`#382`](https://github.com/th-ch/youtube-music/pull/382) -- add tuna plugin for obs [`#397`](https://github.com/th-ch/youtube-music/pull/397) -- Update menu buttons to new format [`#389`](https://github.com/th-ch/youtube-music/pull/389) -- Plugin to fetch lyrics from Genius [`#387`](https://github.com/th-ch/youtube-music/pull/387) -- Add mpris support with cherry picked commit from previous - PR https://github.com/th-ch/youtube-music/pull/394 [`#395`](https://github.com/th-ch/youtube-music/pull/395) -- Add "Listen Along" button, solve #353 [`#383`](https://github.com/th-ch/youtube-music/pull/383) -- Bump node to v14 [`#386`](https://github.com/th-ch/youtube-music/pull/386) -- [Snyk] Upgrade electron-updater from 4.3.9 to 4.3.10 [`#350`](https://github.com/th-ch/youtube-music/pull/350) -- [Snyk] Upgrade chokidar from 3.5.1 to 3.5.2 [`#354`](https://github.com/th-ch/youtube-music/pull/354) -- Bump ytdl/ytpl [`c01506d`](https://github.com/th-ch/youtube-music/commit/c01506dc441bfc538471dc2c552c1a8a2800c611) -- Add mpris support [`e255777`](https://github.com/th-ch/youtube-music/commit/e255777283c7b16611404cbfe260bfcca75a1e40) -- Add Genius lyrics - plugin [`acbe0ac`](https://github.com/th-ch/youtube-music/commit/acbe0ac25d568c25fedb514e0e96c66497b0f2d6) - -#### [v1.12.2](https://github.com/th-ch/youtube-music/compare/v1.12.1...v1.12.2) - -> 1 July 2021 - -- Fix downloader plugin [`#339`](https://github.com/th-ch/youtube-music/pull/339) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.22.0 to - 1.22.1 [`#337`](https://github.com/th-ch/youtube-music/pull/337) -- Update and simplify in-app-menu [`#249`](https://github.com/th-ch/youtube-music/pull/249) -- Bump hosted-git-info from 2.8.8 to 2.8.9 [`#331`](https://github.com/th-ch/youtube-music/pull/331) -- Bump lodash from 4.17.20 to 4.17.21 [`#330`](https://github.com/th-ch/youtube-music/pull/330) -- [Snyk] Upgrade ytdl-core from 4.8.0 to 4.8.2 [`#328`](https://github.com/th-ch/youtube-music/pull/328) -- [Snyk] Upgrade electron-updater from 4.3.8 to 4.3.9 [`#324`](https://github.com/th-ch/youtube-music/pull/324) -- Bump normalize-url from 4.5.0 to 4.5.1 [`#323`](https://github.com/th-ch/youtube-music/pull/323) -- Bump trim-newlines from 3.0.0 to 3.0.1 [`#320`](https://github.com/th-ch/youtube-music/pull/320) -- [Snyk] Upgrade @ffmpeg/core from 0.9.0 to 0.10.0 [`#317`](https://github.com/th-ch/youtube-music/pull/317) -- [Snyk] Upgrade @ffmpeg/ffmpeg from 0.9.8 to 0.10.0 [`#316`](https://github.com/th-ch/youtube-music/pull/316) -- [Snyk] Upgrade custom-electron-titlebar from 3.2.6 to 3.2.7 [`#311`](https://github.com/th-ch/youtube-music/pull/311) -- fix hidden webp thumbnail throwing MIME type error in - downloader [`#318`](https://github.com/th-ch/youtube-music/pull/318) -- Add Sponsorblock plugin [`#308`](https://github.com/th-ch/youtube-music/pull/308) -- [Snyk] Upgrade @ffmpeg/ffmpeg from 0.9.7 to 0.9.8 [`#305`](https://github.com/th-ch/youtube-music/pull/305) -- Bump dependencies to fix - vulnerabilities [`496836b`](https://github.com/th-ch/youtube-music/commit/496836b33b116e06b8d1361ce1f47ab6c9138cae) -- update refreshMenu() - function [`33855f1`](https://github.com/th-ch/youtube-music/commit/33855f17dd80c099117a3d84bbd9b5021776771c) -- Add SponsorBlock - plugin [`ca64a77`](https://github.com/th-ch/youtube-music/commit/ca64a77ed0236fd9cfb4b40e450578a186638dc7) - -#### [v1.12.1](https://github.com/th-ch/youtube-music/compare/v1.12.0...v1.12.1) - -> 28 May 2021 - -- Bump ws from 7.4.3 to 7.4.6 [`#303`](https://github.com/th-ch/youtube-music/pull/303) -- Bump browserslist from 4.16.3 to 4.16.6 [`#301`](https://github.com/th-ch/youtube-music/pull/301) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.20.4 to - 1.20.5 [`#300`](https://github.com/th-ch/youtube-music/pull/300) -- [Snyk] Upgrade ytdl-core from 4.5.0 to 4.7.0 [`#299`](https://github.com/th-ch/youtube-music/pull/299) -- [Snyk] Upgrade @ffmpeg/core from 0.8.5 to 0.9.0 [`#298`](https://github.com/th-ch/youtube-music/pull/298) -- [Snyk] Upgrade filenamify from 4.2.0 to 4.3.0 [`#293`](https://github.com/th-ch/youtube-music/pull/293) -- [Snyk] Upgrade ytpl from 2.1.1 to 2.2.0 [`#285`](https://github.com/th-ch/youtube-music/pull/285) -- fix song-info callback duplication [`#269`](https://github.com/th-ch/youtube-music/pull/269) -- fix notification showing appID instead of app name on - windows [`#270`](https://github.com/th-ch/youtube-music/pull/270) -- Upgrade electron to v12 [`#273`](https://github.com/th-ch/youtube-music/pull/273) -- fix last-fm overwrite config on each start [`#267`](https://github.com/th-ch/youtube-music/pull/267) -- Downloader tweaks + taskbar progress bar [`#265`](https://github.com/th-ch/youtube-music/pull/265) -- remove `open` dependency from last-fm plugin [`#262`](https://github.com/th-ch/youtube-music/pull/262) -- Fix downloader metadata if not currently playing [`#252`](https://github.com/th-ch/youtube-music/pull/252) -- fix playPause bugs by directly playPause video element [`#259`](https://github.com/th-ch/youtube-music/pull/259) -- Bump ua-parser-js from 0.7.23 to 0.7.28 [`#260`](https://github.com/th-ch/youtube-music/pull/260) -- Fix precise volume listener override [`#253`](https://github.com/th-ch/youtube-music/pull/253) -- fix css not inserting on reload [`#255`](https://github.com/th-ch/youtube-music/pull/255) -- playlist download progressBar - using `chokidar` [`53bf7c5`](https://github.com/th-ch/youtube-music/commit/53bf7c5068fdc14f5aa469d47b3174d27f40e05c) -- download progress bar on - taskbar [`a8ac2c3`](https://github.com/th-ch/youtube-music/commit/a8ac2c3af988f299be85010e7fea541096b7e261) -- fix: upgrade @cliqz/adblocker-electron from 1.20.4 to - 1.20.5 [`c5f84b5`](https://github.com/th-ch/youtube-music/commit/c5f84b568b0c3480af1abc8ff111771e2170a50e) - -#### [v1.12.0](https://github.com/th-ch/youtube-music/compare/v1.11.0...v1.12.0) - -> 4 May 2021 - -- Menu tweaks [`#224`](https://github.com/th-ch/youtube-music/pull/224) -- Interactive notifications for windows [`#228`](https://github.com/th-ch/youtube-music/pull/228) -- [Plugin] Precise volume control [`#236`](https://github.com/th-ch/youtube-music/pull/236) -- [Snyk] Upgrade electron-store from 7.0.2 to 7.0.3 [`#244`](https://github.com/th-ch/youtube-music/pull/244) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.20.3 to - 1.20.4 [`#233`](https://github.com/th-ch/youtube-music/pull/233) -- Dependencies update [`#231`](https://github.com/th-ch/youtube-music/pull/231) -- Fix downloader metadata [`#245`](https://github.com/th-ch/youtube-music/pull/245) -- Last.fm support [`#196`](https://github.com/th-ch/youtube-music/pull/196) -- simple fix for discord plugin [`#239`](https://github.com/th-ch/youtube-music/pull/239) -- In-app-menu plugin - rename plugin & configure menu builder [`#215`](https://github.com/th-ch/youtube-music/pull/215) -- Allows downloading songs that aren't currently playing [`#221`](https://github.com/th-ch/youtube-music/pull/221) -- Updated download plugin icon color to match other icons [`#222`](https://github.com/th-ch/youtube-music/pull/222) -- [Notification Plugin] Fix duplicate notification [`#216`](https://github.com/th-ch/youtube-music/pull/216) -- Pass metadata to front + use metadata URL in downloader [`#213`](https://github.com/th-ch/youtube-music/pull/213) -- Refresh menu on plugin enable/disable (show/hide submenu) [`#217`](https://github.com/th-ch/youtube-music/pull/217) -- remove 'shortcuts' from default plugins [`#218`](https://github.com/th-ch/youtube-music/pull/218) -- [Plugin] styled-bars [`#201`](https://github.com/th-ch/youtube-music/pull/201) -- Add configurable notification urgency [`#212`](https://github.com/th-ch/youtube-music/pull/212) -- add Download Folder Chooser [`#207`](https://github.com/th-ch/youtube-music/pull/207) -- Improved songinfo provider, by using the data from the '/player' - request [`#194`](https://github.com/th-ch/youtube-music/pull/194) -- Download plugin directory chooser [`#10`](https://github.com/th-ch/youtube-music/pull/10) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.20.0 to - 1.20.1 [`#180`](https://github.com/th-ch/youtube-music/pull/180) -- [Plugin] taskbar-mediacontrol (for Windows) [`#200`](https://github.com/th-ch/youtube-music/pull/200) -- merge source [`#3`](https://github.com/th-ch/youtube-music/pull/3) -- merge source [`#2`](https://github.com/th-ch/youtube-music/pull/2) -- Add playlist feature in downloader plugin + custom menus in plugin - system [`#203`](https://github.com/th-ch/youtube-music/pull/203) -- Added Discord timeout [`#192`](https://github.com/th-ch/youtube-music/pull/192) -- Override hide(),show(),isVisible from inside - plugin [`6427b34`](https://github.com/th-ch/youtube-music/commit/6427b3406c8d84c5b7ecbe6a28158d5dc895c3c2) -- added back original - yarn.lock [`24fea5a`](https://github.com/th-ch/youtube-music/commit/24fea5a24afd4f547628549962d24756cca5e413) -- remove local - prompt [`8dc486f`](https://github.com/th-ch/youtube-music/commit/8dc486f18fe02a218b149838dc7ab939ec1b698a) - -#### [v1.11.0](https://github.com/th-ch/youtube-music/compare/v1.10.0...v1.11.0) - -> 9 March 2021 - -- [Snyk] Upgrade electron-store from 7.0.1 to 7.0.2 [`#178`](https://github.com/th-ch/youtube-music/pull/178) -- Added function to toggle resuming of last song when app - starts [`#177`](https://github.com/th-ch/youtube-music/pull/177) -- [Snyk] Upgrade discord-rpc from 3.1.4 to 3.2.0 [`#175`](https://github.com/th-ch/youtube-music/pull/175) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.19.0 to - 1.20.0 [`#154`](https://github.com/th-ch/youtube-music/pull/154) -- Added metadata to downloader plugin, and updated - packages [`dd1bdae`](https://github.com/th-ch/youtube-music/commit/dd1bdae9478ef831ee2a00b29be04c65626933f8) -- Fix download/speed menu - item [`796a7aa`](https://github.com/th-ch/youtube-music/commit/796a7aaaf1ecaf80b2ef113137f2222499803e29) -- fix: upgrade @cliqz/adblocker-electron from 1.19.0 to - 1.20.0 [`538ab52`](https://github.com/th-ch/youtube-music/commit/538ab52abd46c2e3c6abb529c5137b5286d29670) - -#### [v1.10.0](https://github.com/th-ch/youtube-music/compare/v1.9.0...v1.10.0) - -> 7 February 2021 - -- [Snyk] Upgrade @ffmpeg/ffmpeg from 0.9.6 to 0.9.7 [`#146`](https://github.com/th-ch/youtube-music/pull/146) -- Reuse the same notification, instead of creating a new one each time the song - changes. [`#144`](https://github.com/th-ch/youtube-music/pull/144) -- [Snyk] Upgrade ytdl-core from 4.2.1 to 4.3.0 [`#136`](https://github.com/th-ch/youtube-music/pull/136) -- bring the new commits to this fork [`#1`](https://github.com/th-ch/youtube-music/pull/1) -- GH page [`3bcf409`](https://github.com/th-ch/youtube-music/commit/3bcf409f2b1629333714b187c606891cedb12512) -- Add plugin to control playback speed like in YouTube (from 0.25 to - 2) [`f7f3185`](https://github.com/th-ch/youtube-music/commit/f7f31850d3d9879002dc47326e4f6ec9a52c25a1) -- Update back.js [`1fdf241`](https://github.com/th-ch/youtube-music/commit/1fdf2416ad414035104bfb51b8450d82e566cb13) - -#### [v1.9.0](https://github.com/th-ch/youtube-music/compare/v1.8.2...v1.9.0) - -> 15 January 2021 - -- [Snyk] Upgrade electron-debug from 3.1.0 to 3.2.0 [`#121`](https://github.com/th-ch/youtube-music/pull/121) -- Refactor providers [`#125`](https://github.com/th-ch/youtube-music/pull/125) -- Added Discord rich presence and added extra properties to songInfo - provider [`#124`](https://github.com/th-ch/youtube-music/pull/124) -- Fix plugins with context isolation [`#127`](https://github.com/th-ch/youtube-music/pull/127) -- Windows portable exe [`#126`](https://github.com/th-ch/youtube-music/pull/126) -- Split providers in - 2 [`0743034`](https://github.com/th-ch/youtube-music/commit/0743034de0443e889ec11d7ea83727ff4fb96599) -- Added Discord rich presence and added extra properties to songinfo - provider [`a8ce87f`](https://github.com/th-ch/youtube-music/commit/a8ce87f2ccb4f0fdbd36676883e6a0497bebc263) -- Update discord plugin for new provider + wait for - ready [`aec542e`](https://github.com/th-ch/youtube-music/commit/aec542e95e2837f54bf19de675f311444789ea4e) - -#### [v1.8.2](https://github.com/th-ch/youtube-music/compare/v1.8.1...v1.8.2) - -> 12 January 2021 - -- Downloader plugin - custom audio format [`#118`](https://github.com/th-ch/youtube-music/pull/118) -- Globalized the song info and song controls, and updated Touch Bar for - it. [`#102`](https://github.com/th-ch/youtube-music/pull/102) -- Bump electron to v11 [`#120`](https://github.com/th-ch/youtube-music/pull/120) -- Globalized the songinfo and song controls, and changed the pause/play - button. [`9be3e1a`](https://github.com/th-ch/youtube-music/commit/9be3e1afe91f0aa3419040bba65e7b3b83b469c6) -- Simplifies the notification plugin to use the globalized song - info [`5bffdbd`](https://github.com/th-ch/youtube-music/commit/5bffdbd6285a6816749c467d6e912d14748f9959) -- Loads providers before - plugins [`3a5d9bd`](https://github.com/th-ch/youtube-music/commit/3a5d9bd973bdd67e77f8a7687c1430245a9490bd) - -#### [v1.8.1](https://github.com/th-ch/youtube-music/compare/v1.8.0...v1.8.1) - -> 8 January 2021 - -- [Snyk] Upgrade electron-updater from 4.3.5 to 4.3.6 [`#116`](https://github.com/th-ch/youtube-music/pull/116) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.18.8 to - 1.19.0 [`#117`](https://github.com/th-ch/youtube-music/pull/117) -- [Snyk] Upgrade ytdl-core from 4.1.1 to 4.1.2 [`#109`](https://github.com/th-ch/youtube-music/pull/109) -- Bump node-notifier from 8.0.0 to 8.0.1 [`#104`](https://github.com/th-ch/youtube-music/pull/104) -- fix: upgrade electron-updater from 4.3.5 to - 4.3.6 [`0bf77e5`](https://github.com/th-ch/youtube-music/commit/0bf77e592a87eb8a5222cf2c1588488a51044422) -- fix: upgrade @cliqz/adblocker-electron from 1.18.8 to - 1.19.0 [`5c0cc08`](https://github.com/th-ch/youtube-music/commit/5c0cc08d80d60c46e8b27343c6fc302f64fe89e2) -- fix: upgrade ytdl-core from 4.1.1 to - 4.1.2 [`e2cc262`](https://github.com/th-ch/youtube-music/commit/e2cc2628aea653739f878ec2cd2e72e2e70018a1) - -#### [v1.8.0](https://github.com/th-ch/youtube-music/compare/v1.7.5...v1.8.0) - -> 20 December 2020 - -- Added Touch Bar plugin [`#101`](https://github.com/th-ch/youtube-music/pull/101) -- [Snyk] Upgrade @ffmpeg/core from 0.8.4 to 0.8.5 [`#99`](https://github.com/th-ch/youtube-music/pull/99) -- [Snyk] Upgrade @ffmpeg/ffmpeg from 0.9.5 to 0.9.6 [`#100`](https://github.com/th-ch/youtube-music/pull/100) -- [Readme] Web folder for readme assets + new SVG animation [`#96`](https://github.com/th-ch/youtube-music/pull/96) -- Add new Linux targets (deb, freebsd, rpm) [`#94`](https://github.com/th-ch/youtube-music/pull/94) -- Web folder for readme assets + new svg - animation [`01fc965`](https://github.com/th-ch/youtube-music/commit/01fc9651705f457da63615ff774f00957f783d3d) -- touchbar plugin - fixed code - style [`7473677`](https://github.com/th-ch/youtube-music/commit/7473677477071ca5e7b18bda3193e345d7fd549f) -- added initial touchbar - support [`c3e2c13`](https://github.com/th-ch/youtube-music/commit/c3e2c1380810d156d9d6863fffc804242171bec0) - -#### [v1.7.5](https://github.com/th-ch/youtube-music/compare/v1.7.4...v1.7.5) - -> 12 December 2020 - -- Bump ini from 1.3.5 to 1.3.7 [`#92`](https://github.com/th-ch/youtube-music/pull/92) -- Fix adblocking [`#90`](https://github.com/th-ch/youtube-music/pull/90) -- Bump adblocker - dependency [`49497d0`](https://github.com/th-ch/youtube-music/commit/49497d0efb28ee0be5b16d0f1c3660efafcd289c) -- Fix adblocker preloading to inject - scripts/styles [`66c5ce4`](https://github.com/th-ch/youtube-music/commit/66c5ce46caa85a7ae4ceb3d63a9e168827015c71) -- Add uBlock Origin filters to default - sources [`79c7959`](https://github.com/th-ch/youtube-music/commit/79c795927a3be96456a2f45159285c64166a29b8) - -#### [v1.7.4](https://github.com/th-ch/youtube-music/compare/v1.7.3...v1.7.4) - -> 8 December 2020 - -#### [v1.7.3](https://github.com/th-ch/youtube-music/compare/v1.7.2...v1.7.3) - -> 8 December 2020 - -- Adblocker: add option to disable default - lists [`22c7f70`](https://github.com/th-ch/youtube-music/commit/22c7f70c938566a9db9c4d46a57224cfdee43df0) - -#### [v1.7.2](https://github.com/th-ch/youtube-music/compare/v1.7.1...v1.7.2) - -> 6 December 2020 - -- Add AUR badge + beautify badges [`#82`](https://github.com/th-ch/youtube-music/pull/82) -- Bugfix: only use cache with no additional - blocklists [`467171a`](https://github.com/th-ch/youtube-music/commit/467171a17e648331d63f166c2da2f3134e95b37f) -- Add AUR tag + beautify - tags [`d212206`](https://github.com/th-ch/youtube-music/commit/d21220693b9ffa26e05fe1963376b636b40b9952) -- Readme: add youtube-music logo to - badges [`3022fac`](https://github.com/th-ch/youtube-music/commit/3022facbead40ccd81629c37b870ab33ce7fa106) - -#### [v1.7.1](https://github.com/th-ch/youtube-music/compare/v1.7.0...v1.7.1) - -> 3 December 2020 - -- Option to restart the app on config - changes [`fd97576`](https://github.com/th-ch/youtube-music/commit/fd97576611ae80b959ffe7984e88ddc8d28a1ffc) -- Bump version to - 1.7.1 [`e07cac2`](https://github.com/th-ch/youtube-music/commit/e07cac240691b1c9d6909e457824616182374c3a) - -#### [v1.7.0](https://github.com/th-ch/youtube-music/compare/v1.6.5...v1.7.0) - -> 3 December 2020 - -- Refactor config, custom plugin options [`#79`](https://github.com/th-ch/youtube-music/pull/79) -- Refactor config for simpler use and advanced options in - plugins [`8ab2da0`](https://github.com/th-ch/youtube-music/commit/8ab2da0482b6211b6b6d43423ec06daed48dac4f) -- Allow editing config ( - advanced) [`f4fe5c2`](https://github.com/th-ch/youtube-music/commit/f4fe5c2a58e1ad555c321f27c00d2d78184fc687) -- Adblocker - advanced options (caching or not, additional - lists) [`b94d0d4`](https://github.com/th-ch/youtube-music/commit/b94d0d4e8bd3a92bbb5e012a63fa782baa774be7) - -#### [v1.6.5](https://github.com/th-ch/youtube-music/compare/v1.6.4...v1.6.5) - -> 2 December 2020 - -- Add option to disable hardware acceleration [`#77`](https://github.com/th-ch/youtube-music/pull/77) -- Downloader plugin - retry and upgrade dependencies [`#76`](https://github.com/th-ch/youtube-music/pull/76) -- Reflect Arch Linux package name change [`#70`](https://github.com/th-ch/youtube-music/pull/70) -- Option to hide menu [`#67`](https://github.com/th-ch/youtube-music/pull/67) -- Add Arch Linux installation instructions [`#68`](https://github.com/th-ch/youtube-music/pull/68) -- Update ytdl-core to - 4.1.1 [`33a11ef`](https://github.com/th-ch/youtube-music/commit/33a11efe9acad234e41ad9044ae9e67fd573b7f4) -- Autoupdate modal: add download/disable updates - buttons [`ae5b85d`](https://github.com/th-ch/youtube-music/commit/ae5b85d8d748659f2e23d417560026f24ab8ce9c) -- Option to hide menu ( - win/linux) [`4bac3ac`](https://github.com/th-ch/youtube-music/commit/4bac3ace186c5be2cb9409d2b703f960bd662145) - -#### [v1.6.4](https://github.com/th-ch/youtube-music/compare/v1.6.3...v1.6.4) - -> 24 November 2020 - -#### [v1.6.3](https://github.com/th-ch/youtube-music/compare/v1.6.2...v1.6.3) - -> 24 November 2020 - -- Improve CI [`#64`](https://github.com/th-ch/youtube-music/pull/64) -- Ensure menu is visible on all platforms [`#63`](https://github.com/th-ch/youtube-music/pull/63) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.18.3 to 1.18.4 [`#62`](https://github.com/th-ch/youtube-music/pull/62) -- fix: upgrade @cliqz/adblocker-electron from 1.18.3 to - 1.18.4 [`2b243f6`](https://github.com/th-ch/youtube-music/commit/2b243f6dcb00d3b6f27fd066c093e7b16bb384e2) -- CI: cache yarn - directory [`0fd4933`](https://github.com/th-ch/youtube-music/commit/0fd49330d3218ec5f1bc62b72ace28e79d02bc93) -- Run CI on every - push/PR [`cf4827d`](https://github.com/th-ch/youtube-music/commit/cf4827d780fee510a27eecf42453b0505c52bcf9) - -#### [v1.6.2](https://github.com/th-ch/youtube-music/compare/v1.6.0...v1.6.2) - -> 22 November 2020 - -- Add github action to build/release [`#60`](https://github.com/th-ch/youtube-music/pull/60) -- Bump to node 12 [`#59`](https://github.com/th-ch/youtube-music/pull/59) -- Bump to node 12 [`#59`](https://github.com/th-ch/youtube-music/pull/59) -- Add downloader (video -> mp3) plugin (in music - menu) [`e197087`](https://github.com/th-ch/youtube-music/commit/e197087a5027af1ca71ecde7bbdf6351137555b9) -- Delete AppVeyor/Travis CI - integration [`941dd90`](https://github.com/th-ch/youtube-music/commit/941dd90d77a5c46ed5505918374693fcd892af1f) -- GH action to - build/release [`fc4754a`](https://github.com/th-ch/youtube-music/commit/fc4754a1709e6eb70d662f89eafd360aa4a77aa2) - -#### [v1.6.0](https://github.com/th-ch/youtube-music/compare/v1.5.0...v1.6.0) - -> 11 November 2020 - -- [Snyk] Upgrade electron-store from 6.0.0 to 6.0.1 [`#54`](https://github.com/th-ch/youtube-music/pull/54) -- Add notifications plugin (notify of song on play - event) [`bcff6e5`](https://github.com/th-ch/youtube-music/commit/bcff6e51348645395549c206717225fb16a29cda) -- Plugins/event handlers in each - window [`9bc81da`](https://github.com/th-ch/youtube-music/commit/9bc81da6f2c7f5f35769489e179851bdd80a7da8) -- Option to toggle - devtools [`3e97e93`](https://github.com/th-ch/youtube-music/commit/3e97e9307cf0991adc5584a603c292b03bc6202d) - -#### [v1.5.0](https://github.com/th-ch/youtube-music/compare/v1.4.0...v1.5.0) - -> 4 October 2020 - -- Bump node-fetch from 2.6.0 to 2.6.1 [`#45`](https://github.com/th-ch/youtube-music/pull/45) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.17.0 to 1.18.0 [`#47`](https://github.com/th-ch/youtube-music/pull/47) -- [Snyk] Upgrade electron-updater from 4.3.3 to 4.3.4 [`#40`](https://github.com/th-ch/youtube-music/pull/40) -- Bump elliptic from 6.5.2 to 6.5.3 [`#38`](https://github.com/th-ch/youtube-music/pull/38) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.16.0 to 1.16.1 [`#37`](https://github.com/th-ch/youtube-music/pull/37) -- Bump lodash from 4.17.15 to 4.17.19 [`#34`](https://github.com/th-ch/youtube-music/pull/34) -- Option to start at login [`#32`](https://github.com/th-ch/youtube-music/pull/32) -- Bump dependencies [`97dce5a`](https://github.com/th-ch/youtube-music/commit/97dce5ad41ba7ff7a12d4e57a6a0acfeccd666d8) -- Bump electron to v10 (+ remove devtron, bump - spectron) [`5f0dcbb`](https://github.com/th-ch/youtube-music/commit/5f0dcbb3fc9b2912bba690db232184d32c599150) -- Navigation plugin: fix arrow - style [`8d74a0a`](https://github.com/th-ch/youtube-music/commit/8d74a0a9b52c5b5a04b0986e5fbec9b47a35823e) - -#### [v1.4.0](https://github.com/th-ch/youtube-music/compare/v1.3.3...v1.4.0) - -> 12 July 2020 - -- Bump electron from 8.2.1 to 8.2.4 [`#31`](https://github.com/th-ch/youtube-music/pull/31) -- [Snyk] Upgrade electron-store from 5.1.1 to 5.2.0 [`#30`](https://github.com/th-ch/youtube-music/pull/30) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.14.4 to 1.15.0 [`#29`](https://github.com/th-ch/youtube-music/pull/29) -- [Snyk] Upgrade electron-debug from 3.0.1 to 3.1.0 [`#28`](https://github.com/th-ch/youtube-music/pull/28) -- [Snyk] Upgrade electron-updater from 4.3.1 to 4.3.2 [`#27`](https://github.com/th-ch/youtube-music/pull/27) -- [Snyk] Upgrade electron-updater from 4.3.0 to 4.3.1 [`#26`](https://github.com/th-ch/youtube-music/pull/26) -- [Snyk] Upgrade @cliqz/adblocker-electron from 1.14.1 to 1.14.2 [`#25`](https://github.com/th-ch/youtube-music/pull/25) -- [Tests] Add integration tests [`#24`](https://github.com/th-ch/youtube-music/pull/24) -- Add jest, spectron and getPort util for - tests [`736a706`](https://github.com/th-ch/youtube-music/commit/736a70680108620cdecab2da9dd48e10354c713e) -- fix: upgrade electron-updater from 4.3.1 to - 4.3.2 [`8c94510`](https://github.com/th-ch/youtube-music/commit/8c945100e24187885dbbe5bb7830b1da11e4eaa2) -- Add jest config and test environment to launch - app [`bce5b7d`](https://github.com/th-ch/youtube-music/commit/bce5b7d8ebd96886d462a3c999d72e6c69b6f807) - -#### [v1.3.3](https://github.com/th-ch/youtube-music/compare/v1.3.2...v1.3.3) - -> 29 April 2020 - -- Move tray click callback in - setUpTray [`4824dda`](https://github.com/th-ch/youtube-music/commit/4824dda5d52565deb5cd6ef4b51d2d742677a154) -- Bump version to - 1.3.3 [`37cac19`](https://github.com/th-ch/youtube-music/commit/37cac19d9ccae59b89a68b995eaf7e08c7d24d11) - -#### [v1.3.2](https://github.com/th-ch/youtube-music/compare/v1.3.1...v1.3.2) - -> 26 April 2020 - -- [Snyk] Upgrade electron-updater from 4.2.5 to 4.3.0 [`#22`](https://github.com/th-ch/youtube-music/pull/22) -- fix: upgrade electron-updater from 4.2.5 to - 4.3.0 [`9821300`](https://github.com/th-ch/youtube-music/commit/98213005d09d00bf013d2217809736bdc334ede6) -- Hide the app (no quit) on close if tray - enabled [`430687f`](https://github.com/th-ch/youtube-music/commit/430687f4d6d301aaeaeeaa11ae34d971ac3280df) -- Show/hide window when clicking on - tray [`058371a`](https://github.com/th-ch/youtube-music/commit/058371ace8fbd3d9f126454fdc7dbff86df05506) - -#### [v1.3.1](https://github.com/th-ch/youtube-music/compare/v1.2.0...v1.3.1) - -> 12 April 2020 - -- Add options and tray [`#21`](https://github.com/th-ch/youtube-music/pull/21) -- Upgrade outdated dependencies [`#20`](https://github.com/th-ch/youtube-music/pull/20) -- [Plugins] Migrate ad blocker [`#19`](https://github.com/th-ch/youtube-music/pull/19) -- Upgrade xo [`297de08`](https://github.com/th-ch/youtube-music/commit/297de08278c2704b3baf65c455bba72f72acc06f) -- Bump electron-builder (needed after electron - upgrade) [`3d9e59d`](https://github.com/th-ch/youtube-music/commit/3d9e59dc90e0e994e20af55af9134477e68907a5) -- Migrate from adblock-rs to - cliqz [`422c3fc`](https://github.com/th-ch/youtube-music/commit/422c3fc28d83da309a80447dcd5064a4346580e8) - -#### [v1.2.0](https://github.com/th-ch/youtube-music/compare/v1.1.6...v1.2.0) - -> 15 March 2020 - -- [Snyk] Upgrade electron-localshortcut from 3.1.0 to 3.2.1 [`#13`](https://github.com/th-ch/youtube-music/pull/13) -- [Snyk] Upgrade electron-updater from 4.0.6 to 4.2.2 [`#12`](https://github.com/th-ch/youtube-music/pull/12) -- [Snyk] Upgrade electron-debug from 2.1.0 to 2.2.0 [`#15`](https://github.com/th-ch/youtube-music/pull/15) -- Fix vulnerability [`#16`](https://github.com/th-ch/youtube-music/pull/16) -- Plugin: autoconfirm when paused [`#11`](https://github.com/th-ch/youtube-music/pull/11) -- Migrate to yarn to install packages without package.json (but keep npm - rebuild) [`9371a48`](https://github.com/th-ch/youtube-music/commit/9371a4827e2312258a4f692c18f964155d57ceb8) -- Bump electron-store to fix a - vulnerability [`7050dfc`](https://github.com/th-ch/youtube-music/commit/7050dfca5c6a545dabc334690572d7f88b37e027) -- Bump electron - updater [`f25bb59`](https://github.com/th-ch/youtube-music/commit/f25bb59065d84cde202b5192688847c528c6ef61) - -#### [v1.1.6](https://github.com/th-ch/youtube-music/compare/v1.1.5...v1.1.6) - -> 11 September 2019 - -- Bump eslint-utils from 1.3.1 to 1.4.2 [`#7`](https://github.com/th-ch/youtube-music/pull/7) -- Bump lodash.mergewith from 4.6.1 to 4.6.2 [`#4`](https://github.com/th-ch/youtube-music/pull/4) -- Bump lodash from 4.17.11 to 4.17.14 [`#5`](https://github.com/th-ch/youtube-music/pull/5) -- npm audit fix [`1a72129`](https://github.com/th-ch/youtube-music/commit/1a72129108935cbe732621d93b877e90d11a4195) -- Fix Google login [`746b5f1`](https://github.com/th-ch/youtube-music/commit/746b5f13bb08c614df290e69946cfd116a550521) -- Bump version to - 1.1.6 [`6fd10ea`](https://github.com/th-ch/youtube-music/commit/6fd10ea4a0f63e9a46e7307d811977f4e0f3213f) - -#### [v1.1.5](https://github.com/th-ch/youtube-music/compare/v1.1.4...v1.1.5) - -> 6 July 2019 - -- Fix navigation - plugin [`b10a1bb`](https://github.com/th-ch/youtube-music/commit/b10a1bb32dbea187422a43487527c379a9ddbb26) -- Bump version to - 1.1.5 [`07c4a42`](https://github.com/th-ch/youtube-music/commit/07c4a429c15f22b173629618518abb97d9ec0100) - -#### [v1.1.4](https://github.com/th-ch/youtube-music/compare/v1.1.3...v1.1.4) - -> 8 June 2019 - -- isDev -> is - package [`a85325f`](https://github.com/th-ch/youtube-music/commit/a85325f33dbd40517b6029e500569fc1640af2ef) -- Add titlebar/frame only on - MacOS [`b1c4cc9`](https://github.com/th-ch/youtube-music/commit/b1c4cc9c45cc48413118aec8ce54767b1983a3e7) -- Bump version to - 1.1.4 [`0420f2e`](https://github.com/th-ch/youtube-music/commit/0420f2e49e295cede0db22dbb1f35ffafd6318ed) - -#### [v1.1.3](https://github.com/th-ch/youtube-music/compare/v1.1.2...v1.1.3) - -> 2 June 2019 - -- Bump fstream from 1.0.11 to 1.0.12 [`#3`](https://github.com/th-ch/youtube-music/pull/3) -- Version 1.1.3 + npm audit - fix [`147ac48`](https://github.com/th-ch/youtube-music/commit/147ac48de6540c836e835fefe47e66e55dbdc9bc) -- Fix case for - {en/dis}ablePlugin [`e86d63d`](https://github.com/th-ch/youtube-music/commit/e86d63da8cb083b89c2a26e6514a5b0df8868b13) -- Remove outdated download - links [`ec58b5c`](https://github.com/th-ch/youtube-music/commit/ec58b5cbedda8d6f881f0e81f185a1707dbe5fab) - -#### [v1.1.2](https://github.com/th-ch/youtube-music/compare/v1.1.1...v1.1.2) - -> 1 May 2019 - -- Display error/retry in case of - failure [`5a1d7fb`](https://github.com/th-ch/youtube-music/commit/5a1d7fbf230fcd840a3ea654f31602fb5f504852) -- Bump version to - 1.1.2 [`eac2c5c`](https://github.com/th-ch/youtube-music/commit/eac2c5cf14d0a348704f7fbf0ff0bdce02758670) - -#### [v1.1.1](https://github.com/th-ch/youtube-music/compare/v1.1.0...v1.1.1) - -> 28 April 2019 - -- Update package - lock [`2d3f77d`](https://github.com/th-ch/youtube-music/commit/2d3f77d96211460bb81a73c8c62b9e5407a7cf30) -- Add travis config [`5279a45`](https://github.com/th-ch/youtube-music/commit/5279a45f3537170006ba04cd5d59ac8b879d78a5) -- Add Appveyor - config [`abc2bb8`](https://github.com/th-ch/youtube-music/commit/abc2bb8a4f749704f2daf376c0d392030f030caf) - -#### [v1.1.0](https://github.com/th-ch/youtube-music/compare/v1.0.0...v1.1.0) - -> 19 April 2019 - -- Build script + check for - updates [`b3c24a5`](https://github.com/th-ch/youtube-music/commit/b3c24a521281c352c37d649e8334b581b2a1de4f) -- Add download section in - readme [`828e8d4`](https://github.com/th-ch/youtube-music/commit/828e8d472ca3d76dea71d95a85f8fa726404b8e7) -- Add release/licence badge in - readme [`9d343bf`](https://github.com/th-ch/youtube-music/commit/9d343bf779f2fa830302cc84c484bf4a93a25f36) - -#### v1.0.0 - -> 19 April 2019 - -- Initial commit - app + 4 - plugins [`8787b5c`](https://github.com/th-ch/youtube-music/commit/8787b5c175d02b52de65f2c559b411d999fa51e4) -- Fix screenshot shadow + compress - image [`c5c128f`](https://github.com/th-ch/youtube-music/commit/c5c128fa0f77c69e9bf12f6ca551315b37c51e84) -- Missing quote in - readme [`4b446ac`](https://github.com/th-ch/youtube-music/commit/4b446ac7c816c660cf369f3b8b6e420f766ee35f) +#### 1.20.1 + +- fix: Fixes the video-toggle being displayed at the wrong position on fullscreen [`#1218`](https://github.com/organization/youtube-music-next/pull/1218) +- Change Winget Releaser job to `ubuntu-latest` [`#1225`](https://github.com/organization/youtube-music-next/pull/1225) +- Fixes the video-toggle being displayed at the wrong position on fullscreen [`#1218`](https://github.com/organization/youtube-music-next/pull/1218) +- Fix Remove upgrade button [`#1206`](https://github.com/organization/youtube-music-next/pull/1206) +- Fixed Age Restriction Bypass [`#1221`](https://github.com/organization/youtube-music-next/pull/1221) +- fix(tuna): handle `playPaused` [`#1`](https://github.com/organization/youtube-music-next/pull/1) +- Add plugin to always use the compact sidebar [`#1190`](https://github.com/organization/youtube-music-next/pull/1190) +- Hide login elements [`#1189`](https://github.com/organization/youtube-music-next/pull/1189) +- Fix navigation arrows [`#1191`](https://github.com/organization/youtube-music-next/pull/1191) +- MacOS better copy paste in readme.md [`#1156`](https://github.com/organization/youtube-music-next/pull/1156) +- Bump version to 1.20.0 [`#1117`](https://github.com/organization/youtube-music-next/pull/1117) +- Multiple implementations for the Adblocker plugin [`#1134`](https://github.com/organization/youtube-music-next/pull/1134) +- add xesam:url mpris from songInfo.url [`#1138`](https://github.com/organization/youtube-music-next/pull/1138) +- revert adblocker bump [`#1124`](https://github.com/organization/youtube-music-next/pull/1124) +- fix security issues in dependencies [`#1116`](https://github.com/organization/youtube-music-next/pull/1116) +- commit assets/generated [`#1118`](https://github.com/organization/youtube-music-next/pull/1118) +- remove `electron.remote` dependency [`#1113`](https://github.com/organization/youtube-music-next/pull/1113) +- .gitattributes set `eol=lf` on *all* files [`#1115`](https://github.com/organization/youtube-music-next/pull/1115) +- [crossfade] add `[beta]` tag to warn of possible bugs [`#1096`](https://github.com/organization/youtube-music-next/pull/1096) +- [crossfade] add menu options [`#1065`](https://github.com/organization/youtube-music-next/pull/1065) +- [captions-selector] add `autoload` option [`#1079`](https://github.com/organization/youtube-music-next/pull/1079) +- [downloader] Cleanup metadata [`#1091`](https://github.com/organization/youtube-music-next/pull/1091) +- fix protocol handler on unix [`#1099`](https://github.com/organization/youtube-music-next/pull/1099) +- fix merge conflict mistake in #1032 [`#1090`](https://github.com/organization/youtube-music-next/pull/1090) +- Create providers/decorators.js [`#1068`](https://github.com/organization/youtube-music-next/pull/1068) +- [adblocker] fix ads showing on program start [`#1100`](https://github.com/organization/youtube-music-next/pull/1100) +- Allow downloading age restricted videos [`#1086`](https://github.com/organization/youtube-music-next/pull/1086) +- add starting page option [`#1073`](https://github.com/organization/youtube-music-next/pull/1073) +- [downloader] plugin overhaul [`#1054`](https://github.com/organization/youtube-music-next/pull/1054) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.25.2 to 1.26.0 [`#1070`](https://github.com/organization/youtube-music-next/pull/1070) +- [in-app-menu] fix css style of the library of uploaded songs [`#1072`](https://github.com/organization/youtube-music-next/pull/1072) +- add option to hide the like buttons [`#1077`](https://github.com/organization/youtube-music-next/pull/1077) +- Nitpick: Fix name casing in tray icon tooltip [`#1081`](https://github.com/organization/youtube-music-next/pull/1081) +- [lyrics-genius] Improved reliability of east asian language detection #1080 [`#1082`](https://github.com/organization/youtube-music-next/pull/1082) +- Add dynamic synced plugin config provider [`#1064`](https://github.com/organization/youtube-music-next/pull/1064) +- [captions-selector] fix button showing when there aren't any captions available [`#1063`](https://github.com/organization/youtube-music-next/pull/1063) +- [in-app-menu] fix items hidden by navbar in library [`#1067`](https://github.com/organization/youtube-music-next/pull/1067) +- Fix Youtube Music logo is draggable [`#1061`](https://github.com/organization/youtube-music-next/pull/1061) +- fix build action failing on forks, and run it on pull requests [`#1069`](https://github.com/organization/youtube-music-next/pull/1069) +- try to fix songInfo time&album [`#1032`](https://github.com/organization/youtube-music-next/pull/1032) +- [lyrics] Romanization toggle for Genius plugin [`#1039`](https://github.com/organization/youtube-music-next/pull/1039) +- [Snyk] Upgrade html-to-text from 9.0.3 to 9.0.4 [`#1056`](https://github.com/organization/youtube-music-next/pull/1056) +- [in-app-menu] add toggle menu icon [`#988`](https://github.com/organization/youtube-music-next/pull/988) +- Fix playback speed slider not showing and PiP button showing when it shouldn't [`#1048`](https://github.com/organization/youtube-music-next/pull/1048) +- [lyrics-genius] Fix lyrics not showing up or showing up when they shouldn't [`#1052`](https://github.com/organization/youtube-music-next/pull/1052) +- [in-app-menu] disable nav-bar drag when menu is open [`#1055`](https://github.com/organization/youtube-music-next/pull/1055) +- [Notifications] [Windows] Native interactive notifications [`#946`](https://github.com/organization/youtube-music-next/pull/946) +- automate winget releases [`#1049`](https://github.com/organization/youtube-music-next/pull/1049) +- build win target on ARM [`#1029`](https://github.com/organization/youtube-music-next/pull/1029) +- feat: auto reconnect rpc and CSP fix [`#961`](https://github.com/organization/youtube-music-next/pull/961) +- [in-app-menu] make navbar draggable [`#989`](https://github.com/organization/youtube-music-next/pull/989) +- Add option `useNativePiP` in PiP plugin to use native PiP [`#1013`](https://github.com/organization/youtube-music-next/pull/1013) +- [PiP] fix hotkey activating when typing in the search box [`#1025`](https://github.com/organization/youtube-music-next/pull/1025) +- [PiP] Remove titlebar when in-app-menu is enabled [`#1024`](https://github.com/organization/youtube-music-next/pull/1024) +- [Shortcuts] MPRIS fixes, Repeat Language bug fix [`#1005`](https://github.com/organization/youtube-music-next/pull/1005) +- Build without release in forks [`#1023`](https://github.com/organization/youtube-music-next/pull/1023) +- [in-app-menu] fix navbar position [`#997`](https://github.com/organization/youtube-music-next/pull/997) +- Migrate to yarn v3 [`#1022`](https://github.com/organization/youtube-music-next/pull/1022) +- [precise-volume] fix arrows shortcuts active in search box [`#1002`](https://github.com/organization/youtube-music-next/pull/1002) +- [new plugin] Add first version for crossfade plugin [`#1012`](https://github.com/organization/youtube-music-next/pull/1012) +- Fix bypass-age-restriction lib import [`#984`](https://github.com/organization/youtube-music-next/pull/984) +- Add menu entry to copy current URL [`#977`](https://github.com/organization/youtube-music-next/pull/977) +- Remove deprecated code [`#979`](https://github.com/organization/youtube-music-next/pull/979) +- Update dev dependencies [`#976`](https://github.com/organization/youtube-music-next/pull/976) +- Update electron and various dependencies [`#974`](https://github.com/organization/youtube-music-next/pull/974) +- Add CI job for dependency review [`#973`](https://github.com/organization/youtube-music-next/pull/973) +- Improve captions plugin [`#972`](https://github.com/organization/youtube-music-next/pull/972) +- fix malformed json in tuna-obs [`#817`](https://github.com/organization/youtube-music-next/pull/817) +- Add Captions selector [`#866`](https://github.com/organization/youtube-music-next/pull/866) +- fix SnoreToast implementation [`#941`](https://github.com/organization/youtube-music-next/pull/941) +- Bump json5 from 1.0.1 to 1.0.2 [`#942`](https://github.com/organization/youtube-music-next/pull/942) +- [Snyk] Upgrade custom-electron-titlebar from 4.1.3 to 4.1.5 [`#969`](https://github.com/organization/youtube-music-next/pull/969) +- Fixed video-toggle aligning running before #main-panel exists [`#956`](https://github.com/organization/youtube-music-next/pull/956) +- [New plugin] Music visualizers [`#953`](https://github.com/organization/youtube-music-next/pull/953) +- fix PiP buttons not showing up [`#964`](https://github.com/organization/youtube-music-next/pull/964) +- Use same audio context/source everywhere [`#951`](https://github.com/organization/youtube-music-next/pull/951) +- Automatic release by CI when version is updated [`#936`](https://github.com/organization/youtube-music-next/pull/936) +- Center toggle of video-toggle [`#894`](https://github.com/organization/youtube-music-next/pull/894) +- Load plugins as soon as the window is created [`#890`](https://github.com/organization/youtube-music-next/pull/890) +- Bump qs from 6.5.2 to 6.5.3 [`#913`](https://github.com/organization/youtube-music-next/pull/913) +- [Snyk] Upgrade custom-electron-titlebar from 4.1.1 to 4.1.2 [`#900`](https://github.com/organization/youtube-music-next/pull/900) +- Add option in skip-silences plugin to only skip at the beginning [`#931`](https://github.com/organization/youtube-music-next/pull/931) +- Replace rimraf by del-cli [`#932`](https://github.com/organization/youtube-music-next/pull/932) +- docs: Added winget install instructions [`#873`](https://github.com/organization/youtube-music-next/pull/873) +- [Snyk] Upgrade async-mutex from 0.3.2 to 0.4.0 [`#855`](https://github.com/organization/youtube-music-next/pull/855) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.25.0 to 1.25.1 [`#856`](https://github.com/organization/youtube-music-next/pull/856) +- [Snyk] Upgrade custom-electron-titlebar from 4.1.0 to 4.1.1 [`#865`](https://github.com/organization/youtube-music-next/pull/865) +- [Snyk] Upgrade @ffmpeg/ffmpeg from 0.11.5 to 0.11.6 [`#876`](https://github.com/organization/youtube-music-next/pull/876) +- Discord Plugin RPC Fix [`#888`](https://github.com/organization/youtube-music-next/pull/888) +- Bump FFMpeg [`#854`](https://github.com/organization/youtube-music-next/pull/854) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.23.8 to 1.23.9 [`#823`](https://github.com/organization/youtube-music-next/pull/823) +- [Snyk] Upgrade electron-store from 8.0.2 to 8.1.0 [`#801`](https://github.com/organization/youtube-music-next/pull/801) +- proposal: Adding an option to hide duration before the song ends [`#802`](https://github.com/organization/youtube-music-next/pull/802) +- [Snyk] Security upgrade node-fetch from 2.6.7 to 3.2.10 [`#790`](https://github.com/organization/youtube-music-next/pull/790) +- Update README.md with a new theme repo [`#807`](https://github.com/organization/youtube-music-next/pull/807) +- Fix likes on touchbar (they were inverted) [`#822`](https://github.com/organization/youtube-music-next/pull/822) +- Add Scoop install directions for Windows 🪟 [`#839`](https://github.com/organization/youtube-music-next/pull/839) +- Bump ytdl-core (bug fix) [`#816`](https://github.com/organization/youtube-music-next/pull/816) +- Bump electron and fix tests in CI [`#813`](https://github.com/organization/youtube-music-next/pull/813) +- Allow user to pass custom CSS file [`#800`](https://github.com/organization/youtube-music-next/pull/800) +- [Snyk] Upgrade html-to-text from 8.2.0 to 8.2.1 [`#799`](https://github.com/organization/youtube-music-next/pull/799) +- [Snyk] Upgrade electron-store from 8.0.1 to 8.0.2 [`#772`](https://github.com/organization/youtube-music-next/pull/772) +- Bump jpeg-js from 0.4.3 to 0.4.4 [`#756`](https://github.com/organization/youtube-music-next/pull/756) +- Support MPRIS loop and volume change [`#749`](https://github.com/organization/youtube-music-next/pull/749) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.23.7 to 1.23.8 [`#742`](https://github.com/organization/youtube-music-next/pull/742) +- Use ; instead of space for play/pause. [`#745`](https://github.com/organization/youtube-music-next/pull/745) +- Update readme.md [`#750`](https://github.com/organization/youtube-music-next/pull/750) +- fix lyrics font size [`#753`](https://github.com/organization/youtube-music-next/pull/753) +- fix top gap between nav-bar and browse-page [`#734`](https://github.com/organization/youtube-music-next/pull/734) +- migrate from remote to ipc + fix restart in portable app [`#605`](https://github.com/organization/youtube-music-next/pull/605) +- [Snyk] Upgrade custom-electron-prompt from 1.4.2 to 1.5.0 [`#717`](https://github.com/organization/youtube-music-next/pull/717) +- Picture in Picture v2 [`#685`](https://github.com/organization/youtube-music-next/pull/685) +- Bump ejs from 3.1.6 to 3.1.7 [`#712`](https://github.com/organization/youtube-music-next/pull/712) +- fix injectCSS `did-finish-load` listener overload [`#693`](https://github.com/organization/youtube-music-next/pull/693) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.23.6 to 1.23.7 [`#689`](https://github.com/organization/youtube-music-next/pull/689) +- [Snyk] Upgrade custom-electron-prompt from 1.4.1 to 1.4.2 [`#686`](https://github.com/organization/youtube-music-next/pull/686) +- [Snyk] Upgrade @electron/remote from 2.0.7 to 2.0.8 [`#684`](https://github.com/organization/youtube-music-next/pull/684) +- Improve plugin submenu ux [`#699`](https://github.com/organization/youtube-music-next/pull/699) +- update build action [`#702`](https://github.com/organization/youtube-music-next/pull/702) +- add different modes to video-toggle plugin [`#700`](https://github.com/organization/youtube-music-next/pull/700) +- lint [`#701`](https://github.com/organization/youtube-music-next/pull/701) +- [ImgBot] Optimize images [`#703`](https://github.com/organization/youtube-music-next/pull/703) +- add album to lastfm if available [`#695`](https://github.com/organization/youtube-music-next/pull/695) +- [in-app-menu] add hide icon option [`#680`](https://github.com/organization/youtube-music-next/pull/680) +- Add plugin to bypass age restrictions [`#682`](https://github.com/organization/youtube-music-next/pull/682) +- Add "Picture in picture" plugin [`#674`](https://github.com/organization/youtube-music-next/pull/674) +- Set lyrics metadata from Genius [`#679`](https://github.com/organization/youtube-music-next/pull/679) +- MacOS: bring back the app in dock when using tray + app hidden [`#677`](https://github.com/organization/youtube-music-next/pull/677) +- [Snyk] Upgrade @electron/remote from 2.0.4 to 2.0.5 [`#644`](https://github.com/organization/youtube-music-next/pull/644) +- [Snyk] Upgrade ytpl from 2.2.3 to 2.3.0 [`#660`](https://github.com/organization/youtube-music-next/pull/660) +- [Snyk] Upgrade ytdl-core from 4.10.1 to 4.11.0 [`#659`](https://github.com/organization/youtube-music-next/pull/659) +- Bump plist from 3.0.2 to 3.0.5 [`#678`](https://github.com/organization/youtube-music-next/pull/678) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.23.4 to 1.23.5 [`#624`](https://github.com/organization/youtube-music-next/pull/624) +- [Precise-Volume] fix volumeHud position in miniplayer [`#645`](https://github.com/organization/youtube-music-next/pull/645) +- add always-on-top option [`#655`](https://github.com/organization/youtube-music-next/pull/655) +- [precise-volume] fix expand-volume-slider not updating its value [`#670`](https://github.com/organization/youtube-music-next/pull/670) +- Fix lyrics genius missing parts [`#671`](https://github.com/organization/youtube-music-next/pull/671) +- feat: option to force show like buttons [`#673`](https://github.com/organization/youtube-music-next/pull/673) +- fix custom titlebar in prompt options [`#619`](https://github.com/organization/youtube-music-next/pull/619) +- update in-app-menu [`#596`](https://github.com/organization/youtube-music-next/pull/596) +- Fix clientID [`#602`](https://github.com/organization/youtube-music-next/pull/602) +- Add snoretoast custom compile script [`#600`](https://github.com/organization/youtube-music-next/pull/600) +- fix interactive notifications icon + exclude platform specific plugins from build [`#591`](https://github.com/organization/youtube-music-next/pull/591) +- Add album title to largeImage and change paused icon [`#587`](https://github.com/organization/youtube-music-next/pull/587) +- make useragent override optional [`#595`](https://github.com/organization/youtube-music-next/pull/595) +- get album name from DOM [`#588`](https://github.com/organization/youtube-music-next/pull/588) +- fix various lyrics issues [`#584`](https://github.com/organization/youtube-music-next/pull/584) +- discord set inactivity timeout prompt [`#580`](https://github.com/organization/youtube-music-next/pull/580) +- add single instance lock option [`#578`](https://github.com/organization/youtube-music-next/pull/578) +- fix "restart app on config change" option [`#561`](https://github.com/organization/youtube-music-next/pull/561) +- fix window position save spam [`#562`](https://github.com/organization/youtube-music-next/pull/562) +- load adblocker sooner [`#583`](https://github.com/organization/youtube-music-next/pull/583) +- add description of new plugins to readme [`#585`](https://github.com/organization/youtube-music-next/pull/585) +- Use `center` alignment for lyrics text [`#573`](https://github.com/organization/youtube-music-next/pull/573) +- fix precise-volume hud positioning [`#567`](https://github.com/organization/youtube-music-next/pull/567) +- update electron and dependencies [`#565`](https://github.com/organization/youtube-music-next/pull/565) +- filenamify playlist folder name [`#557`](https://github.com/organization/youtube-music-next/pull/557) +- [Snyk] Security upgrade node-fetch from 2.6.6 to 2.6.7 (3.1.1 incompatible) [`#554`](https://github.com/organization/youtube-music-next/pull/554) +- fix app starting offscreen [`#548`](https://github.com/organization/youtube-music-next/pull/548) +- Release Mac arm64 [`#566`](https://github.com/organization/youtube-music-next/pull/566) +- Build command for Apple (m1) silicon macs [`#553`](https://github.com/organization/youtube-music-next/pull/553) +- [Snyk] Upgrade custom-electron-titlebar from 3.2.9 to 3.2.10 [`#545`](https://github.com/organization/youtube-music-next/pull/545) +- Fix duplicate media session on linux [`#551`](https://github.com/organization/youtube-music-next/pull/551) +- show a badge remaining items when downloading a playlist [`#550`](https://github.com/organization/youtube-music-next/pull/550) +- allow downloading playlists from popup menu [`#549`](https://github.com/organization/youtube-music-next/pull/549) +- xesam:artist should be a list [`#539`](https://github.com/organization/youtube-music-next/pull/539) +- fix notifications showing thumbnail of last song [`#537`](https://github.com/organization/youtube-music-next/pull/537) +- Switch from spectron to playwright to fix tests [`#531`](https://github.com/organization/youtube-music-next/pull/531) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.23.0 to 1.23.1 [`#529`](https://github.com/organization/youtube-music-next/pull/529) +- fix precise-volume options sync [`#525`](https://github.com/organization/youtube-music-next/pull/525) +- Add album art/thumbnail to discord activity [`#524`](https://github.com/organization/youtube-music-next/pull/524) +- fix skip-silences plugin [`#521`](https://github.com/organization/youtube-music-next/pull/521) +- [Snyk] Upgrade electron-updater from 4.6.2 to 4.6.3 [`#520`](https://github.com/organization/youtube-music-next/pull/520) +- update electron & remote & user agents [`#515`](https://github.com/organization/youtube-music-next/pull/515) +- fixes mpris bug in snap [`#513`](https://github.com/organization/youtube-music-next/pull/513) +- Add "Skip silences" plugin [`#519`](https://github.com/organization/youtube-music-next/pull/519) +- Aligned lyric design [`#510`](https://github.com/organization/youtube-music-next/pull/510) +- Fix mpris bugs - follows #480 [`#509`](https://github.com/organization/youtube-music-next/pull/509) +- Various small fixes (discord, video-toggle, precise-volume, playback-speed, shortcuts, lyrics) [`#476`](https://github.com/organization/youtube-music-next/pull/476) +- Mpris + obs-tuna fixes [`#480`](https://github.com/organization/youtube-music-next/pull/480) +- [Snyk] Upgrade node-fetch from 2.6.5 to 2.6.6 [`#498`](https://github.com/organization/youtube-music-next/pull/498) +- fix interaction between blur navbar & in-app-menu [`#491`](https://github.com/organization/youtube-music-next/pull/491) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.22.7 to 1.23.0 [`#475`](https://github.com/organization/youtube-music-next/pull/475) +- New Plugin: Exponential Volume [`#488`](https://github.com/organization/youtube-music-next/pull/488) +- [Snyk] Upgrade electron-updater from 4.6.0 to 4.6.1 [`#474`](https://github.com/organization/youtube-music-next/pull/474) +- Fix loadeddata/metadata video events rarely not firing (+other small fixes) [`#477`](https://github.com/organization/youtube-music-next/pull/477) +- [Snyk] Upgrade custom-electron-prompt from 1.1.0 to 1.2.0 [`#467`](https://github.com/organization/youtube-music-next/pull/467) +- Video Toggle Plugin [`#448`](https://github.com/organization/youtube-music-next/pull/448) +- fix playback speed plugin [`#462`](https://github.com/organization/youtube-music-next/pull/462) +- Fix sponsorblock skipping when not needed [`#465`](https://github.com/organization/youtube-music-next/pull/465) +- Sponsorblock fix + use new apiLoaded event [`#463`](https://github.com/organization/youtube-music-next/pull/463) +- use apiLoaded event in audio-compressor plugin [`#458`](https://github.com/organization/youtube-music-next/pull/458) +- alert on initial hide-menu enabled [`#456`](https://github.com/organization/youtube-music-next/pull/456) +- Blur plugin tweaks and integration with in-app-menu [`#451`](https://github.com/organization/youtube-music-next/pull/451) +- set resume on start url to songInfo.url [`#449`](https://github.com/organization/youtube-music-next/pull/449) +- quality-changer-plugin [`#446`](https://github.com/organization/youtube-music-next/pull/446) +- get songInfo from youtube API [`#443`](https://github.com/organization/youtube-music-next/pull/443) +- New plugin: Blur navigation bar [`#442`](https://github.com/organization/youtube-music-next/pull/442) +- Discord plugin: Clean Up Export (follow-up #380) [`#440`](https://github.com/organization/youtube-music-next/pull/440) +- remove upgrade button + makes images unselectable [`#434`](https://github.com/organization/youtube-music-next/pull/434) +- new auto confirm when paused [`#433`](https://github.com/organization/youtube-music-next/pull/433) +- fix: mpris instance not registering itself and media controls [`#431`](https://github.com/organization/youtube-music-next/pull/431) +- Audio compressor plugin [`#288`](https://github.com/organization/youtube-music-next/pull/288) +- precise-volume plugin fixes & updates [`#275`](https://github.com/organization/youtube-music-next/pull/275) +- Custom Prompt for changing options [`#243`](https://github.com/organization/youtube-music-next/pull/243) +- [Snyk] Upgrade async-mutex from 0.3.1 to 0.3.2 [`#412`](https://github.com/organization/youtube-music-next/pull/412) +- build(deps): bump tmpl from 1.0.4 to 1.0.5 [`#414`](https://github.com/organization/youtube-music-next/pull/414) +- [Snyk] Upgrade node-fetch from 2.6.1 to 2.6.2 [`#416`](https://github.com/organization/youtube-music-next/pull/416) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.22.5 to 1.22.6 [`#429`](https://github.com/organization/youtube-music-next/pull/429) +- build(deps-dev): bump electron from 12.0.8 to 12.1.0 [`#430`](https://github.com/organization/youtube-music-next/pull/430) +- Fix discord clearActivity, menu, listen along option [`#380`](https://github.com/organization/youtube-music-next/pull/380) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.22.4 to 1.22.5 [`#406`](https://github.com/organization/youtube-music-next/pull/406) +- Fix incorrect Google alert caused by changing user agent coresponding to current platform [`#384`](https://github.com/organization/youtube-music-next/pull/384) +- [Snyk] Upgrade electron-updater from 4.4.3 to 4.4.6 [`#401`](https://github.com/organization/youtube-music-next/pull/401) +- [Snyk] Upgrade electron-updater from 4.4.0 to 4.4.1 [`#370`](https://github.com/organization/youtube-music-next/pull/370) +- Bump path-parse from 1.0.6 to 1.0.7 [`#375`](https://github.com/organization/youtube-music-next/pull/375) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.22.2 to 1.22.3 [`#385`](https://github.com/organization/youtube-music-next/pull/385) +- Bump jszip from 3.5.0 to 3.7.1 [`#388`](https://github.com/organization/youtube-music-next/pull/388) +- List missing plugins [`#382`](https://github.com/organization/youtube-music-next/pull/382) +- add tuna plugin for obs [`#397`](https://github.com/organization/youtube-music-next/pull/397) +- Update menu buttons to new format [`#389`](https://github.com/organization/youtube-music-next/pull/389) +- Plugin to fetch lyrics from Genius [`#387`](https://github.com/organization/youtube-music-next/pull/387) +- Add mpris support with cherry picked commit from previous PR https://github.com/th-ch/youtube-music/pull/394 [`#395`](https://github.com/organization/youtube-music-next/pull/395) +- Add "Listen Along" button, solve #353 [`#383`](https://github.com/organization/youtube-music-next/pull/383) +- Bump node to v14 [`#386`](https://github.com/organization/youtube-music-next/pull/386) +- [Snyk] Upgrade electron-updater from 4.3.9 to 4.3.10 [`#350`](https://github.com/organization/youtube-music-next/pull/350) +- [Snyk] Upgrade chokidar from 3.5.1 to 3.5.2 [`#354`](https://github.com/organization/youtube-music-next/pull/354) +- Fix downloader plugin [`#339`](https://github.com/organization/youtube-music-next/pull/339) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.22.0 to 1.22.1 [`#337`](https://github.com/organization/youtube-music-next/pull/337) +- Update and simplify in-app-menu [`#249`](https://github.com/organization/youtube-music-next/pull/249) +- Bump hosted-git-info from 2.8.8 to 2.8.9 [`#331`](https://github.com/organization/youtube-music-next/pull/331) +- Bump lodash from 4.17.20 to 4.17.21 [`#330`](https://github.com/organization/youtube-music-next/pull/330) +- [Snyk] Upgrade ytdl-core from 4.8.0 to 4.8.2 [`#328`](https://github.com/organization/youtube-music-next/pull/328) +- [Snyk] Upgrade electron-updater from 4.3.8 to 4.3.9 [`#324`](https://github.com/organization/youtube-music-next/pull/324) +- Bump normalize-url from 4.5.0 to 4.5.1 [`#323`](https://github.com/organization/youtube-music-next/pull/323) +- Bump trim-newlines from 3.0.0 to 3.0.1 [`#320`](https://github.com/organization/youtube-music-next/pull/320) +- [Snyk] Upgrade @ffmpeg/core from 0.9.0 to 0.10.0 [`#317`](https://github.com/organization/youtube-music-next/pull/317) +- [Snyk] Upgrade @ffmpeg/ffmpeg from 0.9.8 to 0.10.0 [`#316`](https://github.com/organization/youtube-music-next/pull/316) +- [Snyk] Upgrade custom-electron-titlebar from 3.2.6 to 3.2.7 [`#311`](https://github.com/organization/youtube-music-next/pull/311) +- fix hidden webp thumbnail throwing MIME type error in downloader [`#318`](https://github.com/organization/youtube-music-next/pull/318) +- Add Sponsorblock plugin [`#308`](https://github.com/organization/youtube-music-next/pull/308) +- [Snyk] Upgrade @ffmpeg/ffmpeg from 0.9.7 to 0.9.8 [`#305`](https://github.com/organization/youtube-music-next/pull/305) +- Bump ws from 7.4.3 to 7.4.6 [`#303`](https://github.com/organization/youtube-music-next/pull/303) +- Bump browserslist from 4.16.3 to 4.16.6 [`#301`](https://github.com/organization/youtube-music-next/pull/301) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.20.4 to 1.20.5 [`#300`](https://github.com/organization/youtube-music-next/pull/300) +- [Snyk] Upgrade ytdl-core from 4.5.0 to 4.7.0 [`#299`](https://github.com/organization/youtube-music-next/pull/299) +- [Snyk] Upgrade @ffmpeg/core from 0.8.5 to 0.9.0 [`#298`](https://github.com/organization/youtube-music-next/pull/298) +- [Snyk] Upgrade filenamify from 4.2.0 to 4.3.0 [`#293`](https://github.com/organization/youtube-music-next/pull/293) +- [Snyk] Upgrade ytpl from 2.1.1 to 2.2.0 [`#285`](https://github.com/organization/youtube-music-next/pull/285) +- fix song-info callback duplication [`#269`](https://github.com/organization/youtube-music-next/pull/269) +- fix notification showing appID instead of app name on windows [`#270`](https://github.com/organization/youtube-music-next/pull/270) +- Upgrade electron to v12 [`#273`](https://github.com/organization/youtube-music-next/pull/273) +- fix last-fm overwrite config on each start [`#267`](https://github.com/organization/youtube-music-next/pull/267) +- Downloader tweaks + taskbar progress bar [`#265`](https://github.com/organization/youtube-music-next/pull/265) +- remove `open` dependency from last-fm plugin [`#262`](https://github.com/organization/youtube-music-next/pull/262) +- Fix downloader metadata if not currently playing [`#252`](https://github.com/organization/youtube-music-next/pull/252) +- fix playPause bugs by directly playPause video element [`#259`](https://github.com/organization/youtube-music-next/pull/259) +- Bump ua-parser-js from 0.7.23 to 0.7.28 [`#260`](https://github.com/organization/youtube-music-next/pull/260) +- Fix precise volume listener override [`#253`](https://github.com/organization/youtube-music-next/pull/253) +- fix css not inserting on reload [`#255`](https://github.com/organization/youtube-music-next/pull/255) +- Menu tweaks [`#224`](https://github.com/organization/youtube-music-next/pull/224) +- Interactive notifications for windows [`#228`](https://github.com/organization/youtube-music-next/pull/228) +- [Plugin] Precise volume control [`#236`](https://github.com/organization/youtube-music-next/pull/236) +- [Snyk] Upgrade electron-store from 7.0.2 to 7.0.3 [`#244`](https://github.com/organization/youtube-music-next/pull/244) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.20.3 to 1.20.4 [`#233`](https://github.com/organization/youtube-music-next/pull/233) +- Dependencies update [`#231`](https://github.com/organization/youtube-music-next/pull/231) +- Fix downloader metadata [`#245`](https://github.com/organization/youtube-music-next/pull/245) +- Last.fm support [`#196`](https://github.com/organization/youtube-music-next/pull/196) +- simple fix for discord plugin [`#239`](https://github.com/organization/youtube-music-next/pull/239) +- In-app-menu plugin - rename plugin & configure menu builder [`#215`](https://github.com/organization/youtube-music-next/pull/215) +- Allows downloading songs that aren't currently playing [`#221`](https://github.com/organization/youtube-music-next/pull/221) +- Updated download plugin icon color to match other icons [`#222`](https://github.com/organization/youtube-music-next/pull/222) +- [Notification Plugin] Fix duplicate notification [`#216`](https://github.com/organization/youtube-music-next/pull/216) +- Pass metadata to front + use metadata URL in downloader [`#213`](https://github.com/organization/youtube-music-next/pull/213) +- Refresh menu on plugin enable/disable (show/hide submenu) [`#217`](https://github.com/organization/youtube-music-next/pull/217) +- remove 'shortcuts' from default plugins [`#218`](https://github.com/organization/youtube-music-next/pull/218) +- [Plugin] styled-bars [`#201`](https://github.com/organization/youtube-music-next/pull/201) +- Add configurable notification urgency [`#212`](https://github.com/organization/youtube-music-next/pull/212) +- add Download Folder Chooser [`#207`](https://github.com/organization/youtube-music-next/pull/207) +- Improved songinfo provider, by using the data from the '/player' request [`#194`](https://github.com/organization/youtube-music-next/pull/194) +- Download plugin directory chooser [`#10`](https://github.com/organization/youtube-music-next/pull/10) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.20.0 to 1.20.1 [`#180`](https://github.com/organization/youtube-music-next/pull/180) +- [Plugin] taskbar-mediacontrol (for Windows) [`#200`](https://github.com/organization/youtube-music-next/pull/200) +- merge source [`#3`](https://github.com/organization/youtube-music-next/pull/3) +- merge source [`#2`](https://github.com/organization/youtube-music-next/pull/2) +- Add playlist feature in downloader plugin + custom menus in plugin system [`#203`](https://github.com/organization/youtube-music-next/pull/203) +- Added Discord timeout [`#192`](https://github.com/organization/youtube-music-next/pull/192) +- [Snyk] Upgrade electron-store from 7.0.1 to 7.0.2 [`#178`](https://github.com/organization/youtube-music-next/pull/178) +- Added function to toggle resuming of last song when app starts [`#177`](https://github.com/organization/youtube-music-next/pull/177) +- [Snyk] Upgrade discord-rpc from 3.1.4 to 3.2.0 [`#175`](https://github.com/organization/youtube-music-next/pull/175) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.19.0 to 1.20.0 [`#154`](https://github.com/organization/youtube-music-next/pull/154) +- [Snyk] Upgrade @ffmpeg/ffmpeg from 0.9.6 to 0.9.7 [`#146`](https://github.com/organization/youtube-music-next/pull/146) +- Reuse the same notification, instead of creating a new one each time the song changes. [`#144`](https://github.com/organization/youtube-music-next/pull/144) +- [Snyk] Upgrade ytdl-core from 4.2.1 to 4.3.0 [`#136`](https://github.com/organization/youtube-music-next/pull/136) +- [Snyk] Upgrade electron-debug from 3.1.0 to 3.2.0 [`#121`](https://github.com/organization/youtube-music-next/pull/121) +- bring the new commits to this fork [`#1`](https://github.com/organization/youtube-music-next/pull/1) +- Refactor providers [`#125`](https://github.com/organization/youtube-music-next/pull/125) +- Added Discord rich presence and added extra properties to songInfo provider [`#124`](https://github.com/organization/youtube-music-next/pull/124) +- Fix plugins with context isolation [`#127`](https://github.com/organization/youtube-music-next/pull/127) +- Windows portable exe [`#126`](https://github.com/organization/youtube-music-next/pull/126) +- Downloader plugin - custom audio format [`#118`](https://github.com/organization/youtube-music-next/pull/118) +- Globalized the song info and song controls, and updated Touch Bar for it. [`#102`](https://github.com/organization/youtube-music-next/pull/102) +- Bump electron to v11 [`#120`](https://github.com/organization/youtube-music-next/pull/120) +- [Snyk] Upgrade electron-updater from 4.3.5 to 4.3.6 [`#116`](https://github.com/organization/youtube-music-next/pull/116) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.18.8 to 1.19.0 [`#117`](https://github.com/organization/youtube-music-next/pull/117) +- [Snyk] Upgrade ytdl-core from 4.1.1 to 4.1.2 [`#109`](https://github.com/organization/youtube-music-next/pull/109) +- Bump node-notifier from 8.0.0 to 8.0.1 [`#104`](https://github.com/organization/youtube-music-next/pull/104) +- Added Touch Bar plugin [`#101`](https://github.com/organization/youtube-music-next/pull/101) +- [Snyk] Upgrade @ffmpeg/core from 0.8.4 to 0.8.5 [`#99`](https://github.com/organization/youtube-music-next/pull/99) +- [Snyk] Upgrade @ffmpeg/ffmpeg from 0.9.5 to 0.9.6 [`#100`](https://github.com/organization/youtube-music-next/pull/100) +- [Readme] Web folder for readme assets + new SVG animation [`#96`](https://github.com/organization/youtube-music-next/pull/96) +- Add new Linux targets (deb, freebsd, rpm) [`#94`](https://github.com/organization/youtube-music-next/pull/94) +- Bump ini from 1.3.5 to 1.3.7 [`#92`](https://github.com/organization/youtube-music-next/pull/92) +- Fix adblocking [`#90`](https://github.com/organization/youtube-music-next/pull/90) +- Add AUR badge + beautify badges [`#82`](https://github.com/organization/youtube-music-next/pull/82) +- Refactor config, custom plugin options [`#79`](https://github.com/organization/youtube-music-next/pull/79) +- Add option to disable hardware acceleration [`#77`](https://github.com/organization/youtube-music-next/pull/77) +- Downloader plugin - retry and upgrade dependencies [`#76`](https://github.com/organization/youtube-music-next/pull/76) +- Reflect Arch Linux package name change [`#70`](https://github.com/organization/youtube-music-next/pull/70) +- Option to hide menu [`#67`](https://github.com/organization/youtube-music-next/pull/67) +- Add Arch Linux installation instructions [`#68`](https://github.com/organization/youtube-music-next/pull/68) +- Improve CI [`#64`](https://github.com/organization/youtube-music-next/pull/64) +- Ensure menu is visible on all platforms [`#63`](https://github.com/organization/youtube-music-next/pull/63) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.18.3 to 1.18.4 [`#62`](https://github.com/organization/youtube-music-next/pull/62) +- Add github action to build/release [`#60`](https://github.com/organization/youtube-music-next/pull/60) +- Bump to node 12 [`#59`](https://github.com/organization/youtube-music-next/pull/59) +- Bump to node 12 [`#59`](https://github.com/organization/youtube-music-next/pull/59) +- [Snyk] Upgrade electron-store from 6.0.0 to 6.0.1 [`#54`](https://github.com/organization/youtube-music-next/pull/54) +- Bump node-fetch from 2.6.0 to 2.6.1 [`#45`](https://github.com/organization/youtube-music-next/pull/45) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.17.0 to 1.18.0 [`#47`](https://github.com/organization/youtube-music-next/pull/47) +- [Snyk] Upgrade electron-updater from 4.3.3 to 4.3.4 [`#40`](https://github.com/organization/youtube-music-next/pull/40) +- Bump elliptic from 6.5.2 to 6.5.3 [`#38`](https://github.com/organization/youtube-music-next/pull/38) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.16.0 to 1.16.1 [`#37`](https://github.com/organization/youtube-music-next/pull/37) +- Bump lodash from 4.17.15 to 4.17.19 [`#34`](https://github.com/organization/youtube-music-next/pull/34) +- Option to start at login [`#32`](https://github.com/organization/youtube-music-next/pull/32) +- Bump electron from 8.2.1 to 8.2.4 [`#31`](https://github.com/organization/youtube-music-next/pull/31) +- [Snyk] Upgrade electron-store from 5.1.1 to 5.2.0 [`#30`](https://github.com/organization/youtube-music-next/pull/30) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.14.4 to 1.15.0 [`#29`](https://github.com/organization/youtube-music-next/pull/29) +- [Snyk] Upgrade electron-debug from 3.0.1 to 3.1.0 [`#28`](https://github.com/organization/youtube-music-next/pull/28) +- [Snyk] Upgrade electron-updater from 4.3.1 to 4.3.2 [`#27`](https://github.com/organization/youtube-music-next/pull/27) +- [Snyk] Upgrade electron-updater from 4.3.0 to 4.3.1 [`#26`](https://github.com/organization/youtube-music-next/pull/26) +- [Snyk] Upgrade @cliqz/adblocker-electron from 1.14.1 to 1.14.2 [`#25`](https://github.com/organization/youtube-music-next/pull/25) +- [Tests] Add integration tests [`#24`](https://github.com/organization/youtube-music-next/pull/24) +- [Snyk] Upgrade electron-updater from 4.2.5 to 4.3.0 [`#22`](https://github.com/organization/youtube-music-next/pull/22) +- Add options and tray [`#21`](https://github.com/organization/youtube-music-next/pull/21) +- Upgrade outdated dependencies [`#20`](https://github.com/organization/youtube-music-next/pull/20) +- [Plugins] Migrate ad blocker [`#19`](https://github.com/organization/youtube-music-next/pull/19) +- [Snyk] Upgrade electron-localshortcut from 3.1.0 to 3.2.1 [`#13`](https://github.com/organization/youtube-music-next/pull/13) +- [Snyk] Upgrade electron-updater from 4.0.6 to 4.2.2 [`#12`](https://github.com/organization/youtube-music-next/pull/12) +- [Snyk] Upgrade electron-debug from 2.1.0 to 2.2.0 [`#15`](https://github.com/organization/youtube-music-next/pull/15) +- Fix vulnerability [`#16`](https://github.com/organization/youtube-music-next/pull/16) +- Plugin: autoconfirm when paused [`#11`](https://github.com/organization/youtube-music-next/pull/11) +- Bump eslint-utils from 1.3.1 to 1.4.2 [`#7`](https://github.com/organization/youtube-music-next/pull/7) +- Bump lodash.mergewith from 4.6.1 to 4.6.2 [`#4`](https://github.com/organization/youtube-music-next/pull/4) +- Bump lodash from 4.17.11 to 4.17.14 [`#5`](https://github.com/organization/youtube-music-next/pull/5) +- Bump fstream from 1.0.11 to 1.0.12 [`#3`](https://github.com/organization/youtube-music-next/pull/3) +- fix: fix #1187 [`#1187`](https://github.com/organization/youtube-music-next/issues/1187) +- fix: resolves #978 [`#978`](https://github.com/organization/youtube-music-next/issues/978) +- fix: resolves #958 [`#958`](https://github.com/organization/youtube-music-next/issues/958) +- revert adblocker bump [`#1105`](https://github.com/organization/youtube-music-next/issues/1105) +- Allow downloading age restricted videos [`#1084`](https://github.com/organization/youtube-music-next/issues/1084) +- add option to hide the like buttons [`#1075`](https://github.com/organization/youtube-music-next/issues/1075) +- add starting page option [`#1071`](https://github.com/organization/youtube-music-next/issues/1071) +- add slight delay to lyrics genius [`#1041`](https://github.com/organization/youtube-music-next/issues/1041) +- fix unescaped url params [`#1050`](https://github.com/organization/youtube-music-next/issues/1050) +- fix playback speed selector [`#1045`](https://github.com/organization/youtube-music-next/issues/1045) +- fix PiP button [`#959`](https://github.com/organization/youtube-music-next/issues/959) +- Add MPRIS volume control [`#776`](https://github.com/organization/youtube-music-next/issues/776) +- Fix https://github.com/th-ch/youtube-music/pull/578#issuecomment-1035517531 [`#578`](https://github.com/th-ch/youtube-music/pull/578) +- fix #490 [`#490`](https://github.com/organization/youtube-music-next/issues/490) +- fix #472 [`#472`](https://github.com/organization/youtube-music-next/issues/472) +- fix: remove `xo`, migration to `eslint` [`c722896`](https://github.com/organization/youtube-music-next/commit/c722896a73cfbca3bbbab67bfcdfa639474e9030) +- bump deps version, remove yarn [`c837f10`](https://github.com/organization/youtube-music-next/commit/c837f104f75270ef29e01c68bed3f6ca8962f866) +- Migrate to yarn to install packages without package.json (but keep npm rebuild) [`9371a48`](https://github.com/organization/youtube-music-next/commit/9371a4827e2312258a4f692c18f964155d57ceb8) From 10049d1ee9ae3c7e1293ea3a05e693f2876118b3 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sun, 1 Oct 2023 12:25:53 +0900 Subject: [PATCH 11/94] chore: update README --- readme.md | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/readme.md b/readme.md index cc17bd3e..f875123a 100644 --- a/readme.md +++ b/readme.md @@ -2,12 +2,12 @@
-[![GitHub release](https://img.shields.io/github/release/th-ch/youtube-music.svg?style=for-the-badge&logo=youtube-music)](https://github.com/th-ch/youtube-music/releases/) -[![GitHub license](https://img.shields.io/github/license/th-ch/youtube-music.svg?style=for-the-badge)](https://github.com/th-ch/youtube-music/blob/master/LICENSE) -[![eslint code style](https://img.shields.io/badge/code_style-eslint-5ed9c7.svg?style=for-the-badge)](https://github.com/th-ch/youtube-music/blob/master/.eslintrc.js) -[![Build status](https://img.shields.io/github/actions/workflow/status/th-ch/youtube-music/build.yml?branch=master&style=for-the-badge&logo=youtube-music)](https://GitHub.com/th-ch/youtube-music/releases/) -[![Known Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/th-ch/youtube-music?style=for-the-badge)](https://snyk.io/test/github/th-ch/youtube-music) -[![GitHub All Releases](https://img.shields.io/github/downloads/th-ch/youtube-music/total?style=for-the-badge&logo=youtube-music)](https://GitHub.com/th-ch/youtube-music/releases/) +[![GitHub release](https://img.shields.io/github/release/organization/youtube-music-next.svg?style=for-the-badge&logo=youtube-music)](https://github.com/organization/youtube-music-next/releases/) +[![GitHub license](https://img.shields.io/github/license/organization/youtube-music-next.svg?style=for-the-badge)](https://github.com/organization/youtube-music-next/blob/master/LICENSE) +[![eslint code style](https://img.shields.io/badge/code_style-eslint-5ed9c7.svg?style=for-the-badge)](https://github.com/organization/youtube-music-next/blob/master/.eslintrc.js) +[![Build status](https://img.shields.io/github/actions/workflow/status/organization/youtube-music-next/build.yml?branch=custom-version&style=for-the-badge&logo=youtube-music)](https://github.com/organization/youtube-music-next/releases/) +[![Known Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/organization/youtube-music-next?style=for-the-badge)](https://snyk.io/test/github/organization/youtube-music-next) +[![GitHub All Releases](https://img.shields.io/github/downloads/organization/youtube-music-next/total?style=for-the-badge&logo=youtube-music)](https://github.com/organization/youtube-music-next/releases/) [![AUR](https://img.shields.io/aur/version/youtube-music-bin?color=blueviolet&style=for-the-badge&logo=youtube-music)](https://aur.archlinux.org/packages/youtube-music-bin)
@@ -28,7 +28,7 @@ ## Download -You can check out the [latest release](https://github.com/th-ch/youtube-music/releases/latest) to quickly find the +You can check out the [latest release](https://github.com/organization/youtube-music-next/releases/latest) to quickly find the latest version. ### Arch Linux @@ -40,7 +40,7 @@ this [wiki page](https://wiki.archlinux.org/index.php/Arch_User_Repository#Insta If you get an error "is damaged and can’t be opened." when launching the app, run the following in the Terminal: -``` +```bash xattr -cr /Applications/YouTube\ Music.app ``` @@ -49,7 +49,7 @@ xattr -cr /Applications/YouTube\ Music.app You can use the [Scoop package manager](https://scoop.sh) to install the `youtube-music` package from the [`extras` bucket](https://github.com/ScoopInstaller/Extras). -``` +```bash scoop bucket add extras scoop install extras/youtube-music ``` @@ -61,7 +61,7 @@ official CLI package manager to install the `th-ch.YouTubeMusic` package. true for the manual installation when trying to run the executable(.exe) after a manual download here on github (same file).* -``` +```bash winget install th-ch.YouTubeMusic ``` @@ -166,7 +166,7 @@ Some predefined themes are available in https://github.com/kerichdev/themes-for- ## Dev -```sh +```bash git clone https://github.com/th-ch/youtube-music cd youtube-music npm @@ -184,18 +184,18 @@ Using plugins, you can: Create a folder in `plugins/YOUR-PLUGIN-NAME`: -- if you need to manipulate the BrowserWindow, create a file `back.js` with the following template: +- if you need to manipulate the BrowserWindow, create a file `back.ts` with the following template: -```node -module.exports = win => { - // win is the BrowserWindow object +```typescript +export default (win: Electron.BrowserWindow) => { + // something }; ``` -- if you need to change the front, create a file `front.js` with the following template: +- if you need to change the front, create a file `front.ts` with the following template: -```node -module.exports = () => { +```typescript +export default () => { // This function will be called as a preload script // So you can use front features like `document.querySelector` }; @@ -205,21 +205,21 @@ module.exports = () => { - injecting custom CSS: create a `style.css` file in the same folder then: -```node -const path = require("path"); -const {injectCSS} = require("../utils"); +```typescript +import path from 'node:path'; +import { injectCSS } from '../utils'; -// back.js -module.exports = win => { - injectCSS(win.webContents, path.join(__dirname, "style.css")); +// back.ts +export default (win: Electron.BrowserWindow) => { + injectCSS(win.webContents, path.join(__dirname, 'style.css')); }; ``` - changing the HTML: -```node -// front.js -module.exports = () => { +```typescript +// front.ts +export default () => { // Remove the login button document.querySelector(".sign-in-link.ytmusic-nav-bar").remove(); }; @@ -243,7 +243,7 @@ using [electron-builder](https://github.com/electron-userland/electron-builder). ## Tests -```sh +```bash npm run test ``` From 40fa1bac92829197fb128e1976407d175b0fbe72 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sun, 1 Oct 2023 12:32:28 +0900 Subject: [PATCH 12/94] fix: CVE-2023-4863, CVE-2023-5129 --- package-lock.json | 64 +++++++++++++++++++++++++++++++++++++++-------- package.json | 1 + 2 files changed, 55 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6af2a176..31c6515b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2327,6 +2327,11 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==" + }, "node_modules/babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -4685,6 +4690,11 @@ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", "dev": true }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, "node_modules/fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", @@ -7659,6 +7669,11 @@ } ] }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" + }, "node_modules/quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -8182,18 +8197,18 @@ "dev": true }, "node_modules/sharp": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.3.tgz", - "integrity": "sha512-XcR4+FCLBFKw1bdB+GEhnUNXNXvnt0tDo4WsBsraKymuo/IAuPuCBVAL2wIkUw2r/dwFW5Q5+g66Kwl2dgDFVg==", + "version": "0.32.6", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", + "integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==", "hasInstallScript": true, "dependencies": { "color": "^4.2.3", - "detect-libc": "^2.0.1", - "node-addon-api": "^5.0.0", + "detect-libc": "^2.0.2", + "node-addon-api": "^6.1.0", "prebuild-install": "^7.1.1", - "semver": "^7.3.8", + "semver": "^7.5.4", "simple-get": "^4.0.1", - "tar-fs": "^2.1.1", + "tar-fs": "^3.0.4", "tunnel-agent": "^0.6.0" }, "engines": { @@ -8204,9 +8219,29 @@ } }, "node_modules/sharp/node_modules/node-addon-api": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" + }, + "node_modules/sharp/node_modules/tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "dependencies": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "node_modules/sharp/node_modules/tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } }, "node_modules/shebang-command": { "version": "2.0.0", @@ -8506,6 +8541,15 @@ "node": ">=10.0.0" } }, + "node_modules/streamx": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz", + "integrity": "sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==", + "dependencies": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", diff --git a/package.json b/package.json index 7ed411db..3e24b233 100644 --- a/package.json +++ b/package.json @@ -165,6 +165,7 @@ }, "overrides": { "xml2js": "0.6.2", + "sharp": "0.32.6", "node-fetch": "2.7.0", "@electron/universal": "1.4.2", "electron": "27.0.0-beta.8" From 71f2123f270a6d42e29cd770e65bbe10308b2887 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sun, 1 Oct 2023 12:33:38 +0900 Subject: [PATCH 13/94] release 1.20.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31c6515b..9df1053f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "youtube-music", - "version": "1.20.1", + "version": "1.20.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "youtube-music", - "version": "1.20.1", + "version": "1.20.2", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 3e24b233..4c618eae 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "youtube-music", "productName": "YouTube Music", - "version": "1.20.1", + "version": "1.20.2", "description": "YouTube Music Desktop App - including custom plugins", "main": "./dist/index.js", "license": "MIT", From 70b5e579b179011525d56e767beaa2d117d13b1f Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sun, 1 Oct 2023 12:42:02 +0900 Subject: [PATCH 14/94] chore: Update index.html --- docs/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 9ad69381..b3a863e6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -102,7 +102,7 @@ From 5cd2e78e884c99b5d246c7cab8ff9b15be537cac Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sun, 1 Oct 2023 12:49:25 +0900 Subject: [PATCH 15/94] release 1.20.3: fix updater download link --- index.ts | 2 +- package-lock.json | 4 ++-- package.json | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.ts b/index.ts index 38b0851d..2eb343ce 100644 --- a/index.ts +++ b/index.ts @@ -438,7 +438,7 @@ app.on('ready', () => { }, 2000); autoUpdater.on('update-available', () => { const downloadLink - = 'https://github.com/th-ch/youtube-music/releases/latest'; + = 'https://github.com/organization/youtube-music-next/releases/latest'; const dialogOptions: Electron.MessageBoxOptions = { type: 'info', buttons: ['OK', 'Download', 'Disable updates'], diff --git a/package-lock.json b/package-lock.json index 9df1053f..d0506294 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "youtube-music", - "version": "1.20.2", + "version": "1.20.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "youtube-music", - "version": "1.20.2", + "version": "1.20.3", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 4c618eae..0d764e97 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,15 @@ { "name": "youtube-music", "productName": "YouTube Music", - "version": "1.20.2", + "version": "1.20.3", "description": "YouTube Music Desktop App - including custom plugins", "main": "./dist/index.js", "license": "MIT", "repository": "organization/youtube-music-next", "author": { - "name": "th-ch", - "email": "th-ch@users.noreply.github.com", - "url": "https://github.com/th-ch/youtube-music" + "name": "organization", + "email": "organization@users.noreply.github.com", + "url": "https://github.com/organization/youtube-music-next" }, "build": { "appId": "com.github.th-ch.youtube-music", From 4118b4b6c4761d034258ae3c9c5a1027b6bf81be Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sun, 1 Oct 2023 04:00:55 +0000 Subject: [PATCH 16/94] Update changelog for v1.20.3 --- changelog.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index efea6083..c6216853 100644 --- a/changelog.md +++ b/changelog.md @@ -2,7 +2,21 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. -#### 1.20.1 +#### [v1.20.3](https://github.com/organization/youtube-music-next/compare/v1.20.2...v1.20.3) + +- release 1.20.3: fix updater download link [`5cd2e78`](https://github.com/organization/youtube-music-next/commit/5cd2e78e884c99b5d246c7cab8ff9b15be537cac) + +#### [v1.20.2](https://github.com/organization/youtube-music-next/compare/v1.20.1...v1.20.2) + +> 1 October 2023 + +- Update changelog for v1.20.1 [`faaf54d`](https://github.com/organization/youtube-music-next/commit/faaf54d0b08c0e6a6e3c0417f7e2f9ca70721fdb) +- fix: CVE-2023-4863, CVE-2023-5129 [`40fa1ba`](https://github.com/organization/youtube-music-next/commit/40fa1bac92829197fb128e1976407d175b0fbe72) +- chore: update README [`10049d1`](https://github.com/organization/youtube-music-next/commit/10049d1ee9ae3c7e1293ea3a05e693f2876118b3) + +#### v1.20.1 + +> 30 September 2023 - fix: Fixes the video-toggle being displayed at the wrong position on fullscreen [`#1218`](https://github.com/organization/youtube-music-next/pull/1218) - Change Winget Releaser job to `ubuntu-latest` [`#1225`](https://github.com/organization/youtube-music-next/pull/1225) From f655cdf953f275b8879247ff8674315c9041408a Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Mon, 2 Oct 2023 17:24:17 +0900 Subject: [PATCH 17/94] fix: fix #7 --- config/defaults.ts | 2 +- menu.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config/defaults.ts b/config/defaults.ts index e32f9857..0108db0e 100644 --- a/config/defaults.ts +++ b/config/defaults.ts @@ -65,7 +65,7 @@ const defaultConfig = { proxy: '', startingPage: '', overrideUserAgent: false, - themes: {} as string[], + themes: [] as string[], }, 'plugins': { // Enabled plugins diff --git a/menu.ts b/menu.ts index fca99e6d..7ff969d9 100644 --- a/menu.ts +++ b/menu.ts @@ -150,7 +150,7 @@ export const mainMenuTemplate = (win: BrowserWindow): MenuTemplate => { { label: 'No theme', type: 'radio', - checked: !config.get('options.themes'), // Todo rename "themes" + checked: config.get('options.themes').length === 0, // Todo rename "themes" click() { config.set('options.themes', []); }, @@ -158,8 +158,7 @@ export const mainMenuTemplate = (win: BrowserWindow): MenuTemplate => { { type: 'separator' }, { label: 'Import custom CSS file', - type: 'radio', - checked: false, + type: 'normal', async click() { const { filePaths } = await dialog.showOpenDialog({ filters: [{ name: 'CSS Files', extensions: ['css'] }], From 61b04e9b424ad78e4ba50a54f4cacd80e9a9de2f Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Mon, 2 Oct 2023 18:04:51 +0900 Subject: [PATCH 18/94] fix: fix #4 --- plugins/in-app-menu/style.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/in-app-menu/style.css b/plugins/in-app-menu/style.css index 7cfa4486..231c790e 100644 --- a/plugins/in-app-menu/style.css +++ b/plugins/in-app-menu/style.css @@ -17,6 +17,11 @@ padding-top: 0 !important; } +/* https://github.com/organization/youtube-music-next/issues/4 */ +#sections { + padding-top: 30px !important; +} + /* fix navbar hiding library items */ ytmusic-section-list-renderer[page-type="MUSIC_PAGE_TYPE_LIBRARY_CONTENT_LANDING_PAGE"], ytmusic-section-list-renderer[page-type="MUSIC_PAGE_TYPE_PRIVATELY_OWNED_CONTENT_LANDING_PAGE"] { From 042083b1124cb89308ad38d600ed4e972dbddbc2 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Mon, 2 Oct 2023 19:08:17 +0900 Subject: [PATCH 19/94] feat(disable-autoplay): add `apply once`, resolve #9 --- config/defaults.ts | 3 +++ plugins/disable-autoplay/front.ts | 17 +++++++++++------ plugins/disable-autoplay/menu.ts | 20 ++++++++++++++++++++ 3 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 plugins/disable-autoplay/menu.ts diff --git a/config/defaults.ts b/config/defaults.ts index 0108db0e..fa3a929d 100644 --- a/config/defaults.ts +++ b/config/defaults.ts @@ -113,6 +113,9 @@ const defaultConfig = { 'lyric-genius': { romanizedLyrics: false, }, + 'disable-autoplay': { + applyOnce: false, + }, 'discord': { enabled: false, autoReconnect: true, // If enabled, will try to reconnect to discord every 5 seconds after disconnecting or failing to connect diff --git a/plugins/disable-autoplay/front.ts b/plugins/disable-autoplay/front.ts index 176c6bcf..0af23a4d 100644 --- a/plugins/disable-autoplay/front.ts +++ b/plugins/disable-autoplay/front.ts @@ -1,4 +1,6 @@ -export default () => { +import type { ConfigType } from '../../config/dynamic'; + +export default (options: ConfigType<'disable-autoplay'>) => { const timeUpdateListener = (e: Event) => { if (e.target instanceof HTMLVideoElement) { e.target.pause(); @@ -6,13 +8,16 @@ export default () => { }; document.addEventListener('apiLoaded', (apiEvent) => { - apiEvent.detail.addEventListener('videodatachange', (name: string) => { + const eventListener = (name: string) => { + if (options.applyOnce) { + apiEvent.detail.removeEventListener('videodatachange', eventListener); + } + if (name === 'dataloaded') { apiEvent.detail.pauseVideo(); - document.querySelector('video')?.addEventListener('timeupdate', timeUpdateListener); - } else { - document.querySelector('video')?.removeEventListener('timeupdate', timeUpdateListener); + document.querySelector('video')?.addEventListener('timeupdate', timeUpdateListener, { once: true }); } - }); + }; + apiEvent.detail.addEventListener('videodatachange', eventListener); }, { once: true, passive: true }); }; diff --git a/plugins/disable-autoplay/menu.ts b/plugins/disable-autoplay/menu.ts new file mode 100644 index 00000000..44575929 --- /dev/null +++ b/plugins/disable-autoplay/menu.ts @@ -0,0 +1,20 @@ +import { BrowserWindow } from 'electron'; + +import { setMenuOptions } from '../../config/plugins'; + +import { MenuTemplate } from '../../menu'; + +import type { ConfigType } from '../../config/dynamic'; + +export default (_: BrowserWindow, options: ConfigType<'disable-autoplay'>): MenuTemplate => [ + { + label: 'Applies only on startup', + type: 'checkbox', + checked: options.applyOnce, + click() { + setMenuOptions('disable-autoplay', { + applyOnce: !options.applyOnce, + }); + } + } +]; From aed1bbc6d724c9d71462843467ab51b77e1cf5a1 Mon Sep 17 00:00:00 2001 From: Su-Yong Date: Mon, 2 Oct 2023 21:00:53 +0900 Subject: [PATCH 20/94] fix(lyrics-genius): fix th-ch/youtube-music#1253 --- plugins/lyrics-genius/front.ts | 160 +++++++++++++++++---------------- 1 file changed, 81 insertions(+), 79 deletions(-) diff --git a/plugins/lyrics-genius/front.ts b/plugins/lyrics-genius/front.ts index 8e54ac94..ebfc0071 100644 --- a/plugins/lyrics-genius/front.ts +++ b/plugins/lyrics-genius/front.ts @@ -4,103 +4,105 @@ import is from 'electron-is'; import type { SongInfo } from '../../providers/song-info'; export default () => { - ipcRenderer.on('update-song-info', (_, extractedSongInfo: SongInfo) => setTimeout(async () => { - const tabList = document.querySelectorAll('tp-yt-paper-tab'); - const tabs = { - upNext: tabList[0], - lyrics: tabList[1], - discover: tabList[2], - }; + const setLyrics = (lyricsContainer: Element, lyrics: string | null) => { + lyricsContainer.innerHTML = ` +
+ ${lyrics?.replaceAll(/\r\n|\r|\n/g, '
') ?? 'Could not retrieve lyrics from genius'} +
+ + + `; - // Check if disabled - if (!tabs.lyrics?.hasAttribute('disabled')) { - return; + if (lyrics) { + const footer = lyricsContainer.querySelector('.footer'); + + if (footer) { + footer.textContent = 'Source: Genius'; + } } + }; - let hasLyrics = true; + let unregister: (() => void) | null = null; - const lyrics = await ipcRenderer.invoke( - 'search-genius-lyrics', - extractedSongInfo, - ) as string; - if (!lyrics) { - // Delete previous lyrics if tab is open and couldn't get new lyrics - checkLyricsContainer(() => { - hasLyrics = false; - setTabsOnclick(undefined); - }); - return; - } + ipcRenderer.on('update-song-info', (_, extractedSongInfo: SongInfo) => { + unregister?.(); - if (is.dev()) { - console.log('Fetched lyrics from Genius'); - } + setTimeout(async () => { + const tabList = document.querySelectorAll('tp-yt-paper-tab'); + const tabs = { + upNext: tabList[0], + lyrics: tabList[1], + discover: tabList[2], + }; - enableLyricsTab(); + // Check if disabled + if (!tabs.lyrics?.hasAttribute('disabled')) return; - setTabsOnclick(enableLyricsTab); + const lyrics = await ipcRenderer.invoke( + 'search-genius-lyrics', + extractedSongInfo, + ) as string | null; - checkLyricsContainer(); + if (!lyrics) { + // Delete previous lyrics if tab is open and couldn't get new lyrics + tabs.upNext.click(); + + return; + } + + if (is.dev()) { + console.log('Fetched lyrics from Genius'); + } + + const tryToInjectLyric = (callback?: () => void) => { + const lyricsContainer = document.querySelector( + '[page-type="MUSIC_PAGE_TYPE_TRACK_LYRICS"] > ytmusic-message-renderer', + ); + + if (lyricsContainer) { + callback?.(); + + setLyrics(lyricsContainer, lyrics); + applyLyricsTabState(); + } + }; + const applyLyricsTabState = () => { + if (lyrics) { + tabs.lyrics.removeAttribute('disabled'); + tabs.lyrics.removeAttribute('aria-disabled'); + } else { + tabs.lyrics.setAttribute('disabled', ''); + tabs.lyrics.setAttribute('aria-disabled', ''); + } + }; + const lyricsTabHandler = () => { + const tabContainer = document.querySelector('ytmusic-tab-renderer'); + if (!tabContainer) return; - const lyricsTabHandler = () => { - const tabContainer = document.querySelector('ytmusic-tab-renderer'); - if (tabContainer) { const observer = new MutationObserver((_, observer) => { - checkLyricsContainer(() => observer.disconnect()); + tryToInjectLyric(() => observer.disconnect()); }); + observer.observe(tabContainer, { attributes: true, childList: true, subtree: true, }); - } - }; + }; - tabs.lyrics.addEventListener('click', lyricsTabHandler); + applyLyricsTabState(); - function checkLyricsContainer(callback = () => { - }) { - const lyricsContainer = document.querySelector( - '[page-type="MUSIC_PAGE_TYPE_TRACK_LYRICS"] > ytmusic-message-renderer', - ); - if (lyricsContainer) { - callback(); - setLyrics(lyricsContainer); - } - } + tabs.discover.addEventListener('click', applyLyricsTabState); + tabs.lyrics.addEventListener('click', lyricsTabHandler); + tabs.upNext.addEventListener('click', applyLyricsTabState); - function setLyrics(lyricsContainer: Element) { - lyricsContainer.innerHTML = `
- ${ - hasLyrics - ? lyrics.replaceAll(/\r\n|\r|\n/g, '
') - : 'Could not retrieve lyrics from genius' - } + tryToInjectLyric(); -
- `; - if (hasLyrics) { - const footer = lyricsContainer.querySelector('.footer'); - if (footer) { - footer.textContent = 'Source: Genius'; - enableLyricsTab(); - } - } - } - - const defaultHandler = () => {}; - - function setTabsOnclick(callback: EventListenerOrEventListenerObject | undefined) { - for (const tab of [tabs.upNext, tabs.discover]) { - if (tab) { - tab.addEventListener('click', callback ?? defaultHandler); - } - } - } - - function enableLyricsTab() { - tabs.lyrics.removeAttribute('disabled'); - tabs.lyrics.removeAttribute('aria-disabled'); - } - }, 500)); + unregister = () => { + tabs.discover.removeEventListener('click', applyLyricsTabState); + tabs.lyrics.removeEventListener('click', lyricsTabHandler); + tabs.upNext.removeEventListener('click', applyLyricsTabState); + }; + }, 500); + }); }; From a5fe8bc5893daa099ce6ace53ea24fd24d1d0e33 Mon Sep 17 00:00:00 2001 From: Su-Yong Date: Mon, 2 Oct 2023 21:50:52 +0900 Subject: [PATCH 21/94] feat(precise-volume): add shadow on volume text --- plugins/precise-volume/volume-hud.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/precise-volume/volume-hud.css b/plugins/precise-volume/volume-hud.css index 71cc2c4e..6517eb94 100644 --- a/plugins/precise-volume/volume-hud.css +++ b/plugins/precise-volume/volume-hud.css @@ -4,6 +4,8 @@ transition: opacity 0.6s; pointer-events: none; padding: 10px; + + text-shadow: rgba(0, 0, 0, 0.5) 0px 0px 12px; } ytmusic-player[player-ui-state_="MINIPLAYER"] #volumeHud { From 5a7774e7b179558da4cd1d2fc32eae104f2ed90e Mon Sep 17 00:00:00 2001 From: Su-Yong Date: Tue, 3 Oct 2023 03:31:25 +0900 Subject: [PATCH 22/94] refactor(in-app-menu): refactor in-app-menu plugin resolve #13 --- assets/youtube-music.svg | 13 ++ index.ts | 7 +- package-lock.json | 9 - package.json | 1 - plugins/in-app-menu/back.ts | 53 ++++-- .../in-app-menu/custom-electron-titlebar.d.ts | 9 - plugins/in-app-menu/front.ts | 122 +++++--------- plugins/in-app-menu/menu/icons.ts | 10 ++ plugins/in-app-menu/menu/panel.ts | 125 ++++++++++++++ plugins/in-app-menu/style.css | 118 ------------- plugins/in-app-menu/titlebar.css | 157 ++++++++++++++++++ 11 files changed, 399 insertions(+), 225 deletions(-) create mode 100644 assets/youtube-music.svg delete mode 100644 plugins/in-app-menu/custom-electron-titlebar.d.ts create mode 100644 plugins/in-app-menu/menu/icons.ts create mode 100644 plugins/in-app-menu/menu/panel.ts delete mode 100644 plugins/in-app-menu/style.css create mode 100644 plugins/in-app-menu/titlebar.css diff --git a/assets/youtube-music.svg b/assets/youtube-music.svg new file mode 100644 index 00000000..ae721786 --- /dev/null +++ b/assets/youtube-music.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/index.ts b/index.ts index 2eb343ce..8a46ad28 100644 --- a/index.ts +++ b/index.ts @@ -136,7 +136,12 @@ function createMainWindow() { sandbox: false, }), }, - frame: !is.macOS() && !useInlineMenu, + frame: !is.macOS() && !is.linux() && !useInlineMenu, + titleBarOverlay: { + color: '#00000000', + symbolColor: '#ffffff', + height: 36, + }, titleBarStyle: useInlineMenu ? 'hidden' : (is.macOS() diff --git a/package-lock.json b/package-lock.json index d0506294..c5e2b95f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,6 @@ "butterchurn-presets": "2.4.7", "conf": "10.2.0", "custom-electron-prompt": "1.5.7", - "custom-electron-titlebar": "4.1.6", "electron-better-web-request": "1.0.1", "electron-debug": "3.2.0", "electron-is": "3.0.0", @@ -3184,14 +3183,6 @@ "electron": ">=10.0.0" } }, - "node_modules/custom-electron-titlebar": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/custom-electron-titlebar/-/custom-electron-titlebar-4.1.6.tgz", - "integrity": "sha512-AGULUZMxhEZDpl0Z1jfZzXgQEdhAPe8YET0dYQA/19t8oCrTFzF2PzdvJNCmxGU4Ai3jPWVeCPKg4vM7ffU0Mg==", - "peerDependencies": { - "electron": ">20" - } - }, "node_modules/dbus-next": { "version": "0.9.2", "resolved": "https://registry.npmjs.org/dbus-next/-/dbus-next-0.9.2.tgz", diff --git a/package.json b/package.json index 0d764e97..ddd74ba5 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,6 @@ "butterchurn-presets": "2.4.7", "conf": "10.2.0", "custom-electron-prompt": "1.5.7", - "custom-electron-titlebar": "4.1.6", "electron-better-web-request": "1.0.1", "electron-debug": "3.2.0", "electron-is": "3.0.0", diff --git a/plugins/in-app-menu/back.ts b/plugins/in-app-menu/back.ts index 61a00cbd..ff13e30d 100644 --- a/plugins/in-app-menu/back.ts +++ b/plugins/in-app-menu/back.ts @@ -1,27 +1,58 @@ import path from 'node:path'; import { register } from 'electron-localshortcut'; -// eslint-disable-next-line import/no-unresolved -import { attachTitlebarToWindow, setupTitlebar } from 'custom-electron-titlebar/main'; -import { BrowserWindow } from 'electron'; +import { BrowserWindow, Menu, MenuItem, ipcMain } from 'electron'; import { injectCSS } from '../utils'; - -setupTitlebar(); - // Tracks menu visibility - export default (win: BrowserWindow) => { - // Css for custom scrollbar + disable drag area(was causing bugs) - injectCSS(win.webContents, path.join(__dirname, 'style.css')); + injectCSS(win.webContents, path.join(__dirname, 'titlebar.css')); win.once('ready-to-show', () => { - attachTitlebarToWindow(win); - register(win, '`', () => { win.webContents.send('toggleMenu'); }); }); + + ipcMain.handle( + 'get-menu', + () => JSON.parse(JSON.stringify( + Menu.getApplicationMenu(), + (key: string, value: unknown) => (key !== 'commandsMap' && key !== 'menu') ? value : undefined), + ), + ); + + const getMenuItemById = (commandId: number): MenuItem | null => { + const menu = Menu.getApplicationMenu(); + + let target: MenuItem | null = null; + const stack = [...menu?.items ?? []]; + while (stack.length > 0) { + const now = stack.shift(); + now?.submenu?.items.forEach((item) => stack.push(item)); + + if (now?.commandId === commandId) { + target = now; + break; + } + } + + return target; + }; + + ipcMain.handle('menu-event', (event, commandId: number) => { + const target = getMenuItemById(commandId); + if (target) target.click(undefined, BrowserWindow.fromWebContents(event.sender), event.sender); + }); + + ipcMain.handle('get-menu-by-id', (_, commandId: number) => { + const result = getMenuItemById(commandId); + + return JSON.parse(JSON.stringify( + result, + (key: string, value: unknown) => (key !== 'commandsMap' && key !== 'menu') ? value : undefined), + ); + }); }; diff --git a/plugins/in-app-menu/custom-electron-titlebar.d.ts b/plugins/in-app-menu/custom-electron-titlebar.d.ts deleted file mode 100644 index f724278d..00000000 --- a/plugins/in-app-menu/custom-electron-titlebar.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare module 'custom-electron-titlebar' { - // eslint-disable-next-line import/no-unresolved - import OriginalTitlebar from 'custom-electron-titlebar/dist/titlebar'; - // eslint-disable-next-line import/no-unresolved - import { Color as OriginalColor } from 'custom-electron-titlebar/dist/vs/base/common/color'; - - export const Color: typeof OriginalColor; - export const Titlebar: typeof OriginalTitlebar; -} diff --git a/plugins/in-app-menu/front.ts b/plugins/in-app-menu/front.ts index a09a2de4..a8b48146 100644 --- a/plugins/in-app-menu/front.ts +++ b/plugins/in-app-menu/front.ts @@ -1,12 +1,12 @@ +import path from 'node:path'; + import { ipcRenderer, Menu } from 'electron'; -// eslint-disable-next-line import/no-unresolved -import { Color, Titlebar } from 'custom-electron-titlebar'; -import config from '../../config'; +import { createPanel } from './menu/panel'; + +import { ElementFromFile } from '../utils'; import { isEnabled } from '../../config/plugins'; -import type { FastAverageColorResult } from 'fast-average-color'; - type ElectronCSSStyleDeclaration = CSSStyleDeclaration & { webkitAppRegion: 'drag' | 'no-drag' }; type ElectronHTMLElement = HTMLElement & { style: ElectronCSSStyleDeclaration }; @@ -15,60 +15,60 @@ function $(selector: string) { } export default () => { - const visible = () => !!($('.cet-menubar')?.firstChild); - const bar = new Titlebar({ - icon: 'https://cdn-icons-png.flaticon.com/512/5358/5358672.png', - backgroundColor: Color.fromHex('#050505'), - itemBackgroundColor: Color.fromHex('#1d1d1d') , - svgColor: Color.WHITE, - menu: config.get('options.hideMenu') ? null as unknown as Menu : undefined, - }); - bar.updateTitle(' '); + const titleBar = document.createElement('title-bar'); + const navBar = document.querySelector('#nav-bar-background'); + + const logo = ElementFromFile(path.join(__dirname, '../../assets/youtube-music.svg')); + logo.classList.add('title-bar-icon'); + + titleBar.appendChild(logo); + document.body.appendChild(titleBar); + + if (navBar) { + const observer = new MutationObserver((mutations) => { + mutations.forEach(() => { + titleBar.style.setProperty('--titlebar-background-color', navBar.style.backgroundColor); + document.querySelector('html')!.style.setProperty('--titlebar-background-color', navBar.style.backgroundColor); + }); + }); + + observer.observe(navBar, { attributes : true, attributeFilter : ['style'] }); + } + + const updateMenu = async () => { + const children = [...titleBar.children]; + children.forEach((child) => { + if (child !== logo) child.remove(); + }); + + const menu = await ipcRenderer.invoke('get-menu') as Menu | null; + if (!menu) return; + + menu.items.forEach((menuItem) => { + const menu = document.createElement('menu-button'); + createPanel(titleBar, menu, menuItem.submenu?.items ?? []); + + menu.append(menuItem.label); + titleBar.appendChild(menu); + }); + }; + updateMenu(); + document.title = 'Youtube Music'; - const toggleMenu = () => { - if (visible()) { - bar.updateMenu(null as unknown as Menu); - } else { - bar.refreshMenu(); - } - }; - - $('.cet-window-icon')?.addEventListener('click', toggleMenu); - ipcRenderer.on('toggleMenu', toggleMenu); - ipcRenderer.on('refreshMenu', () => { - if (visible()) { - bar.refreshMenu(); - } + updateMenu(); }); - if (isEnabled('album-color-theme')) { - ipcRenderer.on('album-color-changed', (_, albumColor: FastAverageColorResult) => { - if (albumColor) { - bar.updateBackground(Color.fromHex(albumColor.hexa)); - } else { - bar.updateBackground(Color.fromHex('#050505')); - } - }); - } - if (isEnabled('picture-in-picture')) { ipcRenderer.on('pip-toggle', () => { - bar.refreshMenu(); + updateMenu(); }); } // Increases the right margin of Navbar background when the scrollbar is visible to avoid blocking it (z-index doesn't affect it) document.addEventListener('apiLoaded', () => { - setNavbarMargin(); - const playPageObserver = new MutationObserver(setNavbarMargin); - const appLayout = $('ytmusic-app-layout'); - if (appLayout) { - playPageObserver.observe(appLayout, { attributeFilter: ['player-page-open_', 'playerPageOpen_'] }); - } setupSearchOpenObserver(); - setupMenuOpenObserver(); }, { once: true, passive: true }); }; @@ -84,33 +84,3 @@ function setupSearchOpenObserver() { searchOpenObserver.observe(searchBox, { attributeFilter: ['opened'] }); } } - -function setupMenuOpenObserver() { - const cetMenubar = $('.cet-menubar'); - if (cetMenubar) { - const menuOpenObserver = new MutationObserver(() => { - let isOpen = false; - for (const child of cetMenubar.children) { - if (child.classList.contains('open')) { - isOpen = true; - break; - } - } - const navBarBackground = $('#nav-bar-background'); - if (navBarBackground) { - navBarBackground.style.webkitAppRegion = isOpen ? 'no-drag' : 'drag'; - } - }); - menuOpenObserver.observe(cetMenubar, { subtree: true, attributeFilter: ['class'] }); - } -} - -function setNavbarMargin() { - const navBarBackground = $('#nav-bar-background'); - if (navBarBackground) { - navBarBackground.style.right - = $('ytmusic-app-layout')?.playerPageOpen_ - ? '0px' - : '12px'; - } -} diff --git a/plugins/in-app-menu/menu/icons.ts b/plugins/in-app-menu/menu/icons.ts new file mode 100644 index 00000000..e88c61f6 --- /dev/null +++ b/plugins/in-app-menu/menu/icons.ts @@ -0,0 +1,10 @@ +const Icons = { + submenu: '', + checkbox: '', + radio: { + checked: '', + unchecked: '', + }, +}; + +export default Icons; diff --git a/plugins/in-app-menu/menu/panel.ts b/plugins/in-app-menu/menu/panel.ts new file mode 100644 index 00000000..feffb33b --- /dev/null +++ b/plugins/in-app-menu/menu/panel.ts @@ -0,0 +1,125 @@ +import { nativeImage, type MenuItem, ipcRenderer, Menu } from 'electron'; + +import Icons from './icons'; + +import { ElementFromHtml } from '../../utils'; + +interface PanelOptions { + placement?: 'bottom' | 'right'; + order?: number; +} + +export const createPanel = ( + parent: HTMLElement, + anchor: HTMLElement, + items: MenuItem[], + options: PanelOptions = { placement: 'bottom', order: 0 }, +) => { + const childPanels: HTMLElement[] = []; + const panel = document.createElement('menu-panel'); + panel.style.zIndex = `${options.order}`; + + const updateIconState = (iconWrapper: HTMLElement, item: MenuItem) => { + if (item.type === 'checkbox') { + if (item.checked) iconWrapper.innerHTML = Icons.checkbox; + else iconWrapper.innerHTML = ''; + } else if (item.type === 'radio') { + if (item.checked) iconWrapper.innerHTML = Icons.radio.checked; + else iconWrapper.innerHTML = Icons.radio.unchecked; + } else { + const nativeImageIcon = typeof item.icon === 'string' ? nativeImage.createFromPath(item.icon) : item.icon; + const iconURL = nativeImageIcon?.toDataURL(); + + if (iconURL) iconWrapper.style.background = `url(${iconURL})`; + } + }; + + const radioGroups: [MenuItem, HTMLElement][] = []; + items.map((item) => { + if (item.type === 'separator') return panel.appendChild(document.createElement('menu-separator')); + + const menu = document.createElement('menu-item'); + const iconWrapper = document.createElement('menu-icon'); + + updateIconState(iconWrapper, item); + menu.appendChild(iconWrapper); + menu.append(item.label); + + menu.addEventListener('click', async () => { + await ipcRenderer.invoke('menu-event', item.commandId); + const menuItem = await ipcRenderer.invoke('get-menu-by-id', item.commandId) as MenuItem | null; + + if (menuItem) { + updateIconState(iconWrapper, menuItem); + + if (menuItem.type === 'radio') { + await Promise.all( + radioGroups.map(async ([item, iconWrapper]) => { + if (item.commandId === menuItem.commandId) return; + const newItem = await ipcRenderer.invoke('get-menu-by-id', item.commandId) as MenuItem | null; + + if (newItem) updateIconState(iconWrapper, newItem); + }) + ); + } + } + }); + + if (item.type === 'radio') { + radioGroups.push([item, iconWrapper]); + } + + if (item.type === 'submenu') { + const subMenuIcon = document.createElement('menu-icon'); + subMenuIcon.appendChild(ElementFromHtml(Icons.submenu)); + menu.appendChild(subMenuIcon); + + const [child, , children] = createPanel(parent, menu, item.submenu?.items ?? [], { + placement: 'right', + order: (options?.order ?? 0) + 1, + }); + + childPanels.push(child); + children.push(...children); + } + + panel.appendChild(menu); + }); + + /* methods */ + const isOpened = () => panel.getAttribute('open') === 'true'; + const close = () => panel.setAttribute('open', 'false'); + const open = () => { + const rect = anchor.getBoundingClientRect(); + + if (options.placement === 'bottom') { + panel.style.setProperty('--x', `${rect.x}px`); + panel.style.setProperty('--y', `${rect.y + rect.height}px`); + } else { + panel.style.setProperty('--x', `${rect.x + rect.width}px`); + panel.style.setProperty('--y', `${rect.y}px`); + } + + panel.setAttribute('open', 'true'); + }; + + anchor.addEventListener('click', () => { + if (isOpened()) close(); + else open(); + }); + + document.body.addEventListener('click', (event) => { + const path = event.composedPath(); + const isInside = path.some((it) => it === panel || it === anchor || childPanels.includes(it as HTMLElement)); + + if (!isInside) close(); + }); + + parent.appendChild(panel); + + return [ + panel, + { isOpened, close, open }, + childPanels, + ] as const; +}; diff --git a/plugins/in-app-menu/style.css b/plugins/in-app-menu/style.css deleted file mode 100644 index 231c790e..00000000 --- a/plugins/in-app-menu/style.css +++ /dev/null @@ -1,118 +0,0 @@ -/* increase font size for menu and menuItems */ -.titlebar, -.menubar-menu-container .action-label { - font-size: 14px !important; -} - -/* fixes nav-bar-background opacity bug, reposition it, and allows clicking scrollbar through it */ -#nav-bar-background { - opacity: 1 !important; - pointer-events: none !important; - top: 30px !important; - height: 75px !important; -} - -/* fix top gap between nav-bar and browse-page */ -#browse-page { - padding-top: 0 !important; -} - -/* https://github.com/organization/youtube-music-next/issues/4 */ -#sections { - padding-top: 30px !important; -} - -/* fix navbar hiding library items */ -ytmusic-section-list-renderer[page-type="MUSIC_PAGE_TYPE_LIBRARY_CONTENT_LANDING_PAGE"], -ytmusic-section-list-renderer[page-type="MUSIC_PAGE_TYPE_PRIVATELY_OWNED_CONTENT_LANDING_PAGE"] { - top: 50px; - position: relative; -} - -/* remove window dragging for nav bar (conflict with titlebar drag) */ -ytmusic-nav-bar, -.tab-titleiron-icon, -ytmusic-pivot-bar-item-renderer { - -webkit-app-region: unset !important; -} - -/* move up item selection renderers */ -ytmusic-item-section-renderer.stuck #header.ytmusic-item-section-renderer, -ytmusic-tabs.stuck { - top: calc(var(--ytmusic-nav-bar-height) - 15px) !important; -} - -/* fix weird positioning in search screen*/ -ytmusic-header-renderer.ytmusic-search-page { - position: unset !important; -} - -/* Move navBar downwards */ -ytmusic-nav-bar[slot="nav-bar"] { - top: 17px !important; -} - -/* fix page progress bar position*/ -yt-page-navigation-progress, -#progress.yt-page-navigation-progress { - top: 30px !important; -} - -/* custom scrollbar */ -::-webkit-scrollbar { - width: 12px; - background-color: #030303; - border-radius: 100px; - -moz-border-radius: 100px; - -webkit-border-radius: 100px; -} - -/* hover effect for both scrollbar area, and scrollbar 'thumb' */ -::-webkit-scrollbar:hover { - background-color: rgba(15, 15, 15, 0.699); -} - -/* the scrollbar 'thumb' ...that marque oval shape in a scrollbar */ -::-webkit-scrollbar-thumb:vertical { - border: 2px solid rgba(0, 0, 0, 0); - - background: #3a3a3a; - background-clip: padding-box; - border-radius: 100px; - -moz-border-radius: 100px; - -webkit-border-radius: 100px; -} - -::-webkit-scrollbar-thumb:vertical:active { - background: #4d4c4c; /* some darker color when you click it */ - border-radius: 100px; - -moz-border-radius: 100px; - -webkit-border-radius: 100px; -} - -.cet-menubar-menu-container .cet-action-item { - background-color: inherit -} - -/** hideMenu toggler **/ -.cet-window-icon { - -webkit-app-region: no-drag; -} - -.cet-window-icon img { - -webkit-user-drag: none; - filter: invert(50%); -} - -/** make navbar draggable **/ -#nav-bar-background { - -webkit-app-region: drag; -} - -ytmusic-nav-bar input, -ytmusic-nav-bar span, -ytmusic-nav-bar [role="button"], -ytmusic-nav-bar yt-icon, -tp-yt-iron-dropdown { - -webkit-app-region: no-drag; -} diff --git a/plugins/in-app-menu/titlebar.css b/plugins/in-app-menu/titlebar.css new file mode 100644 index 00000000..0c1a4dc7 --- /dev/null +++ b/plugins/in-app-menu/titlebar.css @@ -0,0 +1,157 @@ +:root { + --titlebar-background-color: #030303; + --menu-bar-height: 36px; +} + +title-bar { + -webkit-app-region: drag; + box-sizing: border-box; + + position: fixed; + top: 0; + z-index: 10000000; + + width: 100%; + height: var(--menu-bar-height, 36px); + + display: flex; + flex-flow: row; + justify-content: flex-start; + align-items: center; + gap: 4px; + + color: #f1f1f1; + font-size: 14px; + padding: 4px 12px; + background-color: var(--titlebar-background-color, #030303); + user-select: none; + + transition: opacity 200ms ease 0s, background-color 300ms cubic-bezier(0.2, 0, 0.6, 1) 0s; +} + +menu-button { + -webkit-app-region: none; + + display: flex; + justify-content: center; + align-items: center; + align-self: stretch; + + padding: 2px 8px; + border-radius: 4px; + + cursor: pointer; +} +menu-button:hover { + background-color: rgba(255, 255, 255, 0.1); +} + +menu-panel { + position: fixed; + top: var(--y, 0); + left: var(--x, 0); + + max-height: calc(100vh - var(--menu-bar-height, 36px) - 16px - var(--y, 0)); + + display: flex; + flex-flow: column; + justify-content: flex-start; + align-items: stretch; + gap: 0; + + overflow: auto; + padding: 4px; + border-radius: 8px; + pointer-events: none; + background-color: color-mix(in srgb, var(--titlebar-background-color, #030303) 50%, rgba(0, 0, 0, 0.1)); + backdrop-filter: blur(8px); + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.2); + + z-index: 0; + opacity: 0; + transform: scale(0.8); + transform-origin: top left; + + transition: opacity 200ms ease 0s, transform 200ms ease 0s; +} +menu-panel[open="true"] { + pointer-events: all; + opacity: 1; + transform: scale(1); +} + +menu-item { + -webkit-app-region: none; + min-height: 32px; + height: 32px; + + display: grid; + grid-template-columns: 32px 1fr minmax(32px, auto); + justify-content: flex-start; + align-items: center; + + border-radius: 4px; + cursor: pointer; +} +menu-item:hover { + background-color: rgba(255, 255, 255, 0.1); +} + +menu-item > menu-icon { + height: 32px; + padding: 4px; + + box-sizing: border-box; +} + +menu-separator { + min-height: 1px; + height: 1px; + margin: 4px 0; + + background-color: rgba(255, 255, 255, 0.2); +} + +/* classes */ + +.title-bar-icon { + height: calc(100% - 8px); + object-fit: cover; + margin-left: -4px; +} + +/* youtube-music style */ + +ytmusic-app-layout { + margin-top: var(--menu-bar-height, 36px) !important; +} + +ytmusic-app-layout>[slot=nav-bar], #nav-bar-background.ytmusic-app-layout { + top: var(--menu-bar-height, 36px) !important; +} +#nav-bar-divider.ytmusic-app-layout { + top: calc(var(--ytmusic-nav-bar-height) + var(--menu-bar-height, 36px)) !important; +} +ytmusic-app[is-bauhaus-sidenav-enabled] #guide-spacer.ytmusic-app, +ytmusic-app[is-bauhaus-sidenav-enabled] #mini-guide-spacer.ytmusic-app { + margin-top: calc(var(--ytmusic-nav-bar-height) + var(--menu-bar-height, 36px)) !important; +} + + +html::-webkit-scrollbar { + width: 12px !important; +} + +html::-webkit-scrollbar-thumb { + border: solid 2px var(--titlebar-background-color, #030303) !important; + border-radius: 100px !important; +} + +html::-webkit-scrollbar-track { + background: var(--titlebar-background-color, #030303) !important; +} + +html::-webkit-scrollbar-track-piece:start { + background: transparent; + margin-top: var(--menu-bar-height, 36px); +} From 2cb05c9d86bd426da1ea73665a8a501788026f71 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Tue, 3 Oct 2023 10:45:01 +0900 Subject: [PATCH 23/94] fix(in-app-menu): overlay-scrollbar --- index.ts | 4 +++- plugins/in-app-menu/front.ts | 9 +++++++-- plugins/in-app-menu/titlebar.css | 23 ++--------------------- providers/prompt-custom-titlebar.ts | 21 --------------------- providers/prompt-options.ts | 12 +----------- 5 files changed, 13 insertions(+), 56 deletions(-) delete mode 100644 providers/prompt-custom-titlebar.ts diff --git a/index.ts b/index.ts index 8a46ad28..7ff16525 100644 --- a/index.ts +++ b/index.ts @@ -38,7 +38,9 @@ if (!gotTheLock) { app.exit(); } -app.commandLine.appendSwitch('enable-features', 'SharedArrayBuffer'); // Required for downloader +// SharedArrayBuffer: Required for downloader (@ffmpeg/core-mt) +// OverlayScrollbar: Required for overlay scrollbars +app.commandLine.appendSwitch('enable-features', 'OverlayScrollbar,SharedArrayBuffer'); if (config.get('options.disableHardwareAcceleration')) { if (is.dev()) { console.log('Disabling hardware acceleration'); diff --git a/plugins/in-app-menu/front.ts b/plugins/in-app-menu/front.ts index a8b48146..9ef50c06 100644 --- a/plugins/in-app-menu/front.ts +++ b/plugins/in-app-menu/front.ts @@ -18,7 +18,7 @@ export default () => { const titleBar = document.createElement('title-bar'); const navBar = document.querySelector('#nav-bar-background'); - const logo = ElementFromFile(path.join(__dirname, '../../assets/youtube-music.svg')); + const logo = ElementFromFile(path.join(__dirname, '..' , '..' , 'assets', 'youtube-music.svg')); logo.classList.add('title-bar-icon'); titleBar.appendChild(logo); @@ -47,7 +47,7 @@ export default () => { menu.items.forEach((menuItem) => { const menu = document.createElement('menu-button'); createPanel(titleBar, menu, menuItem.submenu?.items ?? []); - + menu.append(menuItem.label); titleBar.appendChild(menu); }); @@ -69,6 +69,11 @@ export default () => { // Increases the right margin of Navbar background when the scrollbar is visible to avoid blocking it (z-index doesn't affect it) document.addEventListener('apiLoaded', () => { setupSearchOpenObserver(); + const htmlHeadStyle = $('head > div > style'); + if (htmlHeadStyle) { + // HACK: This is a hack to remove the scrollbar width + htmlHeadStyle.innerHTML = htmlHeadStyle.innerHTML.replace('html::-webkit-scrollbar {width: var(--ytmusic-scrollbar-width);', 'html::-webkit-scrollbar {'); + } }, { once: true, passive: true }); }; diff --git a/plugins/in-app-menu/titlebar.css b/plugins/in-app-menu/titlebar.css index 0c1a4dc7..0fc93f01 100644 --- a/plugins/in-app-menu/titlebar.css +++ b/plugins/in-app-menu/titlebar.css @@ -19,7 +19,7 @@ title-bar { justify-content: flex-start; align-items: center; gap: 4px; - + color: #f1f1f1; font-size: 14px; padding: 4px 12px; @@ -109,7 +109,7 @@ menu-separator { height: 1px; margin: 4px 0; - background-color: rgba(255, 255, 255, 0.2); + background-color: rgba(255, 255, 255, 0.2); } /* classes */ @@ -136,22 +136,3 @@ ytmusic-app[is-bauhaus-sidenav-enabled] #guide-spacer.ytmusic-app, ytmusic-app[is-bauhaus-sidenav-enabled] #mini-guide-spacer.ytmusic-app { margin-top: calc(var(--ytmusic-nav-bar-height) + var(--menu-bar-height, 36px)) !important; } - - -html::-webkit-scrollbar { - width: 12px !important; -} - -html::-webkit-scrollbar-thumb { - border: solid 2px var(--titlebar-background-color, #030303) !important; - border-radius: 100px !important; -} - -html::-webkit-scrollbar-track { - background: var(--titlebar-background-color, #030303) !important; -} - -html::-webkit-scrollbar-track-piece:start { - background: transparent; - margin-top: var(--menu-bar-height, 36px); -} diff --git a/providers/prompt-custom-titlebar.ts b/providers/prompt-custom-titlebar.ts deleted file mode 100644 index 5068745c..00000000 --- a/providers/prompt-custom-titlebar.ts +++ /dev/null @@ -1,21 +0,0 @@ -// eslint-disable-next-line import/no-unresolved -import { Titlebar, Color } from 'custom-electron-titlebar'; - -const customTitlebarFunction = () => { - new Titlebar({ - backgroundColor: Color.fromHex('#050505'), - minimizable: false, - maximizable: false, - menu: undefined, - }); - const mainStyle = document.querySelector('#container')?.style; - if (mainStyle) { - mainStyle.width = '100%'; - mainStyle.position = 'fixed'; - mainStyle.border = 'unset'; - } -}; - - -module.exports = customTitlebarFunction; -export default customTitlebarFunction; diff --git a/providers/prompt-options.ts b/providers/prompt-options.ts index 87e27f13..e268b48a 100644 --- a/providers/prompt-options.ts +++ b/providers/prompt-options.ts @@ -1,18 +1,8 @@ import path from 'node:path'; -import is from 'electron-is'; - -import { isEnabled } from '../config/plugins'; - const iconPath = path.join(__dirname, '..', 'assets', 'youtube-music-tray.png'); -const customTitlebarPath = path.join(__dirname, 'prompt-custom-titlebar.js'); -const promptOptions = !is.macOS() && isEnabled('in-app-menu') ? { - customStylesheet: 'dark', - // The following are used for custom titlebar - frame: false, - customScript: customTitlebarPath, -} : { +const promptOptions = { customStylesheet: 'dark', icon: iconPath, }; From 831aa3d391ae307ea3e06ad438851af4f147da8d Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Tue, 3 Oct 2023 11:09:45 +0900 Subject: [PATCH 24/94] feat: add startingPage unset option --- index.ts | 31 +++++++++++++++---------------- menu.ts | 29 ++++++++++++++++++++--------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/index.ts b/index.ts index 7ff16525..59e378e1 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1,6 @@ import path from 'node:path'; -import electron, { BrowserWindow } from 'electron'; +import { BrowserWindow, app, screen, globalShortcut, session, shell, dialog } from 'electron'; import enhanceWebRequest from 'electron-better-web-request'; import is from 'electron-is'; import unhandled from 'electron-unhandled'; @@ -28,7 +28,6 @@ unhandled({ // Disable Node options if the env var is set process.env.NODE_OPTIONS = ''; -const { app } = electron; // Prevent window being garbage collected let mainWindow: Electron.BrowserWindow | null; autoUpdater.autoDownload = false; @@ -40,7 +39,7 @@ if (!gotTheLock) { // SharedArrayBuffer: Required for downloader (@ffmpeg/core-mt) // OverlayScrollbar: Required for overlay scrollbars -app.commandLine.appendSwitch('enable-features', 'OverlayScrollbar,SharedArrayBuffer'); +app.commandLine.appendSwitch('enable-features', 'OverlayScrollbar,FluentScrollbar,SharedArrayBuffer'); if (config.get('options.disableHardwareAcceleration')) { if (is.dev()) { console.log('Disabling hardware acceleration'); @@ -157,7 +156,7 @@ function createMainWindow() { const { x, y } = windowPosition; const winSize = win.getSize(); const displaySize - = electron.screen.getDisplayNearestPoint(windowPosition).bounds; + = screen.getDisplayNearestPoint(windowPosition).bounds; if ( x + winSize[0] < displaySize.x - 8 || x - winSize[0] > displaySize.x + displaySize.width @@ -340,7 +339,7 @@ app.on('window-all-closed', () => { } // Unregister all shortcuts. - electron.globalShortcut.unregisterAll(); + globalShortcut.unregisterAll(); }); app.on('activate', () => { @@ -361,7 +360,7 @@ app.on('ready', () => { console.log('Clearing app cache.'); } - electron.session.defaultSession.clearCache(); + session.defaultSession.clearCache(); clearTimeout(clearCacheTimeout); }, 20_000); } @@ -376,7 +375,7 @@ app.on('ready', () => { if (!is.dev() && !appLocation.startsWith(path.join(appData, '..', 'Local', 'Temp'))) { const shortcutPath = path.join(appData, 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'YouTube Music.lnk'); try { // Check if shortcut is registered and valid - const shortcutDetails = electron.shell.readShortcutLink(shortcutPath); // Throw error if doesn't exist yet + const shortcutDetails = shell.readShortcutLink(shortcutPath); // Throw error if doesn't exist yet if ( shortcutDetails.target !== appLocation || shortcutDetails.appUserModelId !== appID @@ -384,7 +383,7 @@ app.on('ready', () => { throw 'needUpdate'; } } catch (error) { // If not valid -> Register shortcut - electron.shell.writeShortcutLink( + shell.writeShortcutLink( shortcutPath, error === 'needUpdate' ? 'update' : 'create', { @@ -453,11 +452,11 @@ app.on('ready', () => { message: 'A new version is available', detail: `A new version is available and can be downloaded at ${downloadLink}`, }; - electron.dialog.showMessageBox(dialogOptions).then((dialogOutput) => { + dialog.showMessageBox(dialogOptions).then((dialogOutput) => { switch (dialogOutput.response) { // Download case 1: { - electron.shell.openExternal(downloadLink); + shell.openExternal(downloadLink); break; } @@ -476,7 +475,7 @@ app.on('ready', () => { } if (config.get('options.hideMenu') && !config.get('options.hideMenuWarned')) { - electron.dialog.showMessageBox(mainWindow, { + dialog.showMessageBox(mainWindow, { type: 'info', title: 'Hide Menu Enabled', message: "Menu is hidden, use 'Alt' to show it (or 'Escape' if using in-app-menu)", }); @@ -509,7 +508,7 @@ function showUnresponsiveDialog(win: BrowserWindow, details: Electron.RenderProc console.log('Unresponsive Error!\n' + JSON.stringify(details, null, '\t')); } - electron.dialog.showMessageBox(win, { + dialog.showMessageBox(win, { type: 'error', title: 'Window Unresponsive', message: 'The Application is Unresponsive', @@ -534,15 +533,15 @@ function showUnresponsiveDialog(win: BrowserWindow, details: Electron.RenderProc // HACK: electron-better-web-request's typing is wrong type BetterSession = Omit & { webRequest: BetterWebRequest & Electron.WebRequest }; function removeContentSecurityPolicy( - session: BetterSession = electron.session.defaultSession as BetterSession, + betterSession: BetterSession = session.defaultSession as BetterSession, ) { // Allows defining multiple "onHeadersReceived" listeners // by enhancing the session. // Some plugins (e.g. adblocker) also define a "onHeadersReceived" listener - enhanceWebRequest(session); + enhanceWebRequest(betterSession); // Custom listener to tweak the content security policy - session.webRequest.onHeadersReceived((details, callback) => { + betterSession.webRequest.onHeadersReceived((details, callback) => { details.responseHeaders ??= {}; // Remove the content security policy @@ -554,7 +553,7 @@ function removeContentSecurityPolicy( type ResolverListener = { apply: () => Promise>; context: unknown }; // When multiple listeners are defined, apply them all - session.webRequest.setResolver('onHeadersReceived', async (listeners: ResolverListener[]) => { + betterSession.webRequest.setResolver('onHeadersReceived', async (listeners: ResolverListener[]) => { return listeners.reduce>>( async (accumulator: Promise>, listener: ResolverListener) => { const acc = await accumulator; diff --git a/menu.ts b/menu.ts index 7ff969d9..66ac1db0 100644 --- a/menu.ts +++ b/menu.ts @@ -95,14 +95,25 @@ export const mainMenuTemplate = (win: BrowserWindow): MenuTemplate => { }, { label: 'Starting page', - submenu: Object.keys(startingPages).map((name) => ({ - label: name, - type: 'radio', - checked: config.get('options.startingPage') === name, - click() { - config.set('options.startingPage', name); - }, - })), + submenu: (() => { + const subMenuArray: Electron.MenuItemConstructorOptions[] = Object.keys(startingPages).map((name) => ({ + label: name, + type: 'radio', + checked: config.get('options.startingPage') === name, + click() { + config.set('options.startingPage', name); + }, + })); + subMenuArray.unshift({ + label: 'Unset', + type: 'radio', + checked: config.get('options.startingPage') === '', + click() { + config.set('options.startingPage', ''); + }, + }); + return subMenuArray; + })(), }, { label: 'Visual Tweaks', @@ -274,7 +285,7 @@ export const mainMenuTemplate = (win: BrowserWindow): MenuTemplate => { { label: 'Proxy', type: 'checkbox', - checked: !!(config.get('options.proxy')), + checked: !!(config.get('options.proxy')) && config.get('options.proxy') !== '', click(item) { setProxy(item, win); }, From bc40fc3d4922af8844b3e07f4c263efa37a2b63b Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Tue, 3 Oct 2023 11:11:39 +0900 Subject: [PATCH 25/94] fix: remove FluentScrollbar --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 59e378e1..5d744118 100644 --- a/index.ts +++ b/index.ts @@ -39,7 +39,7 @@ if (!gotTheLock) { // SharedArrayBuffer: Required for downloader (@ffmpeg/core-mt) // OverlayScrollbar: Required for overlay scrollbars -app.commandLine.appendSwitch('enable-features', 'OverlayScrollbar,FluentScrollbar,SharedArrayBuffer'); +app.commandLine.appendSwitch('enable-features', 'OverlayScrollbar,SharedArrayBuffer'); if (config.get('options.disableHardwareAcceleration')) { if (is.dev()) { console.log('Disabling hardware acceleration'); From 7af418a0404d6b0630f271a1efb5d53b87b886a1 Mon Sep 17 00:00:00 2001 From: Su-Yong Date: Tue, 3 Oct 2023 12:39:36 +0900 Subject: [PATCH 26/94] fix(in-app-menu): fix titlebar margin --- plugins/in-app-menu/titlebar.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/in-app-menu/titlebar.css b/plugins/in-app-menu/titlebar.css index 0fc93f01..ca67b4b3 100644 --- a/plugins/in-app-menu/titlebar.css +++ b/plugins/in-app-menu/titlebar.css @@ -136,3 +136,12 @@ ytmusic-app[is-bauhaus-sidenav-enabled] #guide-spacer.ytmusic-app, ytmusic-app[is-bauhaus-sidenav-enabled] #mini-guide-spacer.ytmusic-app { margin-top: calc(var(--ytmusic-nav-bar-height) + var(--menu-bar-height, 36px)) !important; } + +ytmusic-app-layout>[slot=player-page] { + margin-top: var(--menu-bar-height); + height: calc(100vh - var(--menu-bar-height) - var(--ytmusic-nav-bar-height) - var(--ytmusic-player-bar-height)) !important; +} + +ytmusic-guide-renderer { + height: calc(100vh - var(--menu-bar-height) - var(--ytmusic-nav-bar-height)) !important; +} From 2c38b8a764bc43582979ccb3a37b2f3e0c5ae6b0 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Tue, 3 Oct 2023 12:44:00 +0900 Subject: [PATCH 27/94] fix(tuna-obs): change to not print messages when not in development mode --- plugins/tuna-obs/back.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/tuna-obs/back.ts b/plugins/tuna-obs/back.ts index c01b6557..f08ae22d 100644 --- a/plugins/tuna-obs/back.ts +++ b/plugins/tuna-obs/back.ts @@ -1,4 +1,5 @@ import { ipcMain, net, BrowserWindow } from 'electron'; +import is from 'electron-is'; import registerCallback from '../../providers/song-info'; @@ -41,7 +42,11 @@ const post = (data: Data) => { method: 'POST', headers, body: JSON.stringify({ data }), - }).catch((error: { code: number, errno: number }) => console.log(`Error: '${error.code || error.errno}' - when trying to access obs-tuna webserver at port ${port}`)); + }).catch((error: { code: number, errno: number }) => { + if (is.dev()) { + console.debug(`Error: '${error.code || error.errno}' - when trying to access obs-tuna webserver at port ${port}`); + } + }); }; export default (win: BrowserWindow) => { From b9ea98c1156b672b79724573a77d90d81abdf4db Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Tue, 3 Oct 2023 12:56:49 +0900 Subject: [PATCH 28/94] fix(in-app-menu): remove unused observer --- plugins/in-app-menu/front.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/plugins/in-app-menu/front.ts b/plugins/in-app-menu/front.ts index 9ef50c06..a5a13b99 100644 --- a/plugins/in-app-menu/front.ts +++ b/plugins/in-app-menu/front.ts @@ -7,9 +7,6 @@ import { createPanel } from './menu/panel'; import { ElementFromFile } from '../utils'; import { isEnabled } from '../../config/plugins'; -type ElectronCSSStyleDeclaration = CSSStyleDeclaration & { webkitAppRegion: 'drag' | 'no-drag' }; -type ElectronHTMLElement = HTMLElement & { style: ElectronCSSStyleDeclaration }; - function $(selector: string) { return document.querySelector(selector); } @@ -68,7 +65,6 @@ export default () => { // Increases the right margin of Navbar background when the scrollbar is visible to avoid blocking it (z-index doesn't affect it) document.addEventListener('apiLoaded', () => { - setupSearchOpenObserver(); const htmlHeadStyle = $('head > div > style'); if (htmlHeadStyle) { // HACK: This is a hack to remove the scrollbar width @@ -76,16 +72,3 @@ export default () => { } }, { once: true, passive: true }); }; - -function setupSearchOpenObserver() { - const searchOpenObserver = new MutationObserver((mutations) => { - const navBarBackground = $('#nav-bar-background'); - if (navBarBackground) { - navBarBackground.style.webkitAppRegion = (mutations[0].target as HTMLElement & { opened: boolean }).opened ? 'no-drag' : 'drag'; - } - }); - const searchBox = $('ytmusic-search-box'); - if (searchBox) { - searchOpenObserver.observe(searchBox, { attributeFilter: ['opened'] }); - } -} From 76c570413af0454870dc0c70f4216ed0878a8e37 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Tue, 3 Oct 2023 14:16:31 +0900 Subject: [PATCH 29/94] fix: Mitigation for issue #2 --- package.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package.json b/package.json index 1ef60a5c..6f1ae4f8 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,9 @@ "!dist/plugins/taskbar-mediacontrol${/*}", "license", "node_modules", + "!node_modules/sharp/vendor", + "!node_modules/**/*.map", + "!node_modules/**/*.ts", "package.json", "tests" ], @@ -44,6 +47,9 @@ "!dist/plugins/touchbar${/*}", "license", "node_modules", + "!node_modules/sharp/vendor", + "!node_modules/**/*.map", + "!node_modules/**/*.ts", "package.json", "tests" ], @@ -75,6 +81,9 @@ "!dist/plugins/{touchbar,taskbar-mediacontrol}${/*}", "license", "node_modules", + "!node_modules/sharp/vendor", + "!node_modules/**/*.map", + "!node_modules/**/*.ts", "package.json", "tests" ], From 45b7422ea85d00cacd6a944fb47c543e34fb7ec1 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Tue, 3 Oct 2023 14:18:06 +0900 Subject: [PATCH 30/94] release 1.20.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 61058a14..fc9b8b21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "youtube-music", - "version": "1.20.3", + "version": "1.20.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "youtube-music", - "version": "1.20.3", + "version": "1.20.4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 6f1ae4f8..8f20998a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "youtube-music", "productName": "YouTube Music", - "version": "1.20.3", + "version": "1.20.4", "description": "YouTube Music Desktop App - including custom plugins", "main": "./dist/index.js", "license": "MIT", From 16a32d1946477e2ec0290d8985240f25be68b6e5 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Tue, 3 Oct 2023 05:31:53 +0000 Subject: [PATCH 31/94] Update changelog for v1.20.4 --- changelog.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/changelog.md b/changelog.md index c6216853..5331210f 100644 --- a/changelog.md +++ b/changelog.md @@ -2,8 +2,20 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. +#### [v1.20.4](https://github.com/organization/youtube-music-next/compare/v1.20.3...v1.20.4) + +- refactor(in-app-menu): refactor in-app-menu plugin [`#13`](https://github.com/organization/youtube-music-next/issues/13) +- feat(disable-autoplay): add `apply once`, resolve #9 [`#9`](https://github.com/organization/youtube-music-next/issues/9) +- fix: fix #4 [`#4`](https://github.com/organization/youtube-music-next/issues/4) +- fix: fix #7 [`#7`](https://github.com/organization/youtube-music-next/issues/7) +- chore(deps): bump deps [`47bd015`](https://github.com/organization/youtube-music-next/commit/47bd01554944bd3ad2d39d4039afd0ad4584b182) +- fix(lyrics-genius): fix th-ch/youtube-music#1253 [`aed1bbc`](https://github.com/organization/youtube-music-next/commit/aed1bbc6d724c9d71462843467ab51b77e1cf5a1) +- fix(in-app-menu): overlay-scrollbar [`2cb05c9`](https://github.com/organization/youtube-music-next/commit/2cb05c9d86bd426da1ea73665a8a501788026f71) + #### [v1.20.3](https://github.com/organization/youtube-music-next/compare/v1.20.2...v1.20.3) +> 1 October 2023 + - release 1.20.3: fix updater download link [`5cd2e78`](https://github.com/organization/youtube-music-next/commit/5cd2e78e884c99b5d246c7cab8ff9b15be537cac) #### [v1.20.2](https://github.com/organization/youtube-music-next/compare/v1.20.1...v1.20.2) From 399c6e37cec0f981e8b8cfa47d3881b3aa37acd3 Mon Sep 17 00:00:00 2001 From: Su-Yong Date: Tue, 3 Oct 2023 18:03:13 +0900 Subject: [PATCH 32/94] fix(video-toggle): fix video config not load config resolve #16 --- plugins/video-toggle/button-switcher.css | 8 +++--- plugins/video-toggle/front.ts | 33 ++++++++++++------------ 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/plugins/video-toggle/button-switcher.css b/plugins/video-toggle/button-switcher.css index 92c052e2..76d22f85 100644 --- a/plugins/video-toggle/button-switcher.css +++ b/plugins/video-toggle/button-switcher.css @@ -15,12 +15,12 @@ background: rgba(33, 33, 33, 0.4); border-radius: 30px; overflow: hidden; - width: 240px; + width: 20rem; text-align: center; font-size: 18px; letter-spacing: 1px; color: #fff; - padding-right: 120px; + padding-right: 10rem; position: absolute; } @@ -30,7 +30,7 @@ top: 0; bottom: 0; right: 0; - width: 120px; + width: 10rem; display: flex; align-items: center; justify-content: center; @@ -55,7 +55,7 @@ } .video-switch-button-checkbox:checked + .video-switch-button-label:before { - transform: translateX(120px); + transform: translateX(10rem); transition: transform 300ms linear; } diff --git a/plugins/video-toggle/front.ts b/plugins/video-toggle/front.ts index 49a3ecd1..2b09f9e7 100644 --- a/plugins/video-toggle/front.ts +++ b/plugins/video-toggle/front.ts @@ -56,17 +56,11 @@ function setup(e: CustomEvent) { $('#player')?.prepend(switchButtonDiv); - if (options.hideVideo) { - const checkbox = $('.video-switch-button-checkbox'); - if (checkbox) { - checkbox.checked = false; - } - changeDisplay(false); - forcePlaybackMode(); - // Fix black video - if (video) { - video.style.height = 'auto'; - } + setVideoState(!options.hideVideo); + forcePlaybackMode(); + // Fix black video + if (video) { + video.style.height = 'auto'; } //Prevents bubbling to the player which causes it to stop or resume @@ -77,9 +71,8 @@ function setup(e: CustomEvent) { // Button checked = show video switchButtonDiv.addEventListener('change', (e) => { const target = e.target as HTMLInputElement; - options.hideVideo = target.checked; - changeDisplay(target.checked); - setOptions('video-toggle', options); + + setVideoState(target.checked); }); video?.addEventListener('srcChanged', videoStarted); @@ -104,7 +97,13 @@ function setup(e: CustomEvent) { } } -function changeDisplay(showVideo: boolean) { +function setVideoState(showVideo: boolean) { + options.hideVideo = !showVideo; + setOptions('video-toggle', options); + + const checkbox = $('.video-switch-button-checkbox'); // custom mode + if (checkbox) checkbox.checked = !options.hideVideo; + if (player) { player.style.margin = showVideo ? '' : 'auto 0px'; player.setAttribute('playback-mode', showVideo ? 'OMV_PREFERRED' : 'ATV_PREFERRED'); @@ -123,7 +122,7 @@ function changeDisplay(showVideo: boolean) { function videoStarted() { if (api.getPlayerResponse().videoDetails.musicVideoType === 'MUSIC_VIDEO_TYPE_ATV') { // Video doesn't exist -> switch to song mode - changeDisplay(false); + setVideoState(false); // Hide toggle button switchButtonDiv.style.display = 'none'; } else { @@ -137,7 +136,7 @@ function videoStarted() { switchButtonDiv.style.display = 'initial'; // Change display to video mode if video exist & video is hidden & option.hideVideo = false if (!options.hideVideo && $('#song-video.ytmusic-player')?.style.display === 'none') { - changeDisplay(true); + setVideoState(true); } else { moveVolumeHud(!options.hideVideo); } From 6eadc7f7e5d6664858e039b4399a3af066de6939 Mon Sep 17 00:00:00 2001 From: Su-Yong Date: Tue, 3 Oct 2023 18:21:43 +0900 Subject: [PATCH 33/94] fix(precise-volume): fix slider ui does not sync resolve #15 --- plugins/precise-volume/front.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/precise-volume/front.ts b/plugins/precise-volume/front.ts index 0acc7583..e5bd1493 100644 --- a/plugins/precise-volume/front.ts +++ b/plugins/precise-volume/front.ts @@ -55,7 +55,7 @@ function firstRun() { setTooltip(options.savedVolume); if (api.getVolume() !== options.savedVolume) { - api.setVolume(options.savedVolume); + setVolume(options.savedVolume); } } From 9438cd8b26b5387fe3c1860be5807317562096d6 Mon Sep 17 00:00:00 2001 From: Su-Yong Date: Tue, 3 Oct 2023 19:06:13 +0900 Subject: [PATCH 34/94] fix: resolve #12 --- youtube-music.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/youtube-music.css b/youtube-music.css index 686feb4f..cc60f284 100644 --- a/youtube-music.css +++ b/youtube-music.css @@ -54,3 +54,8 @@ ytmusic-nav-bar > div.left-content > a, ytmusic-nav-bar > div.left-content > a > picture > img { -webkit-user-drag: none; } + +/* yt-music bugs */ +tp-yt-paper-item.ytmusic-guide-entry-renderer::before { + border-radius: 8px !important; +} From 6e315b9af2d10faac1f23b98a2b7eccf7af86ad6 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Tue, 3 Oct 2023 23:42:12 +0900 Subject: [PATCH 35/94] refactor: remove dynamic require (partial of #2) Co-authored-by: Su-Yong --- config/defaults.ts | 178 ++--- config/dynamic.ts | 6 +- index.ts | 86 ++- menu.ts | 56 +- plugins/adblocker/inject-cliqz-preload.ts | 3 + plugins/adblocker/inject.d.ts | 3 + plugins/adblocker/inject.js | 771 +++++++++++----------- plugins/adblocker/menu.ts | 4 +- plugins/adblocker/preload.ts | 6 +- plugins/album-color-theme/front.ts | 4 +- plugins/crossfade/menu.ts | 4 +- plugins/discord/menu.ts | 5 +- plugins/lyrics-genius/back.ts | 2 +- plugins/lyrics-genius/menu.ts | 3 +- plugins/navigation/actions.ts | 27 - plugins/navigation/back.ts | 28 +- plugins/navigation/templates/back.html | 2 +- plugins/navigation/templates/forward.html | 2 +- plugins/notifications/menu.ts | 31 +- plugins/sponsorblock/back.ts | 9 +- plugins/taskbar-mediacontrol/back.ts | 83 ++- plugins/touchbar/back.ts | 117 ++-- plugins/utils.ts | 21 +- preload.ts | 135 ++-- 24 files changed, 841 insertions(+), 745 deletions(-) create mode 100644 plugins/adblocker/inject-cliqz-preload.ts create mode 100644 plugins/adblocker/inject.d.ts delete mode 100644 plugins/navigation/actions.ts diff --git a/config/defaults.ts b/config/defaults.ts index fa3a929d..ee2e0c3c 100644 --- a/config/defaults.ts +++ b/config/defaults.ts @@ -67,11 +67,8 @@ const defaultConfig = { overrideUserAgent: false, themes: [] as string[], }, + /** please order alphabetically */ 'plugins': { - // Enabled plugins - 'navigation': { - enabled: true, - }, 'adblocker': { enabled: true, cache: true, @@ -79,7 +76,95 @@ const defaultConfig = { additionalBlockLists: [], // Additional list of filters, e.g "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt" disableDefaultLists: [], }, - // Disabled plugins + 'album-color-theme': {}, + 'audio-compressor': {}, + 'blur-nav-bar': {}, + 'bypass-age-restrictions': {}, + 'captions-selector': { + enabled: false, + disableCaptions: false, + autoload: false, + lastCaptionsCode: '', + disabledCaptions: false, + }, + 'compact-sidebar': {}, + 'crossfade': { + enabled: false, + fadeInDuration: 1500, // Ms + fadeOutDuration: 5000, // Ms + secondsBeforeEnd: 10, // S + fadeScaling: 'linear', // 'linear', 'logarithmic' or a positive number in dB + }, + 'disable-autoplay': { + applyOnce: false, + }, + 'discord': { + enabled: false, + autoReconnect: true, // If enabled, will try to reconnect to discord every 5 seconds after disconnecting or failing to connect + activityTimoutEnabled: true, // If enabled, the discord rich presence gets cleared when music paused after the time specified below + activityTimoutTime: 10 * 60 * 1000, // 10 minutes + listenAlong: true, // Add a "listen along" button to rich presence + hideDurationLeft: false, // Hides the start and end time of the song to rich presence + }, + 'downloader': { + enabled: false, + ffmpegArgs: ['-b:a', '256k'], // E.g. ["-b:a", "192k"] for an audio bitrate of 192kb/s + downloadFolder: undefined as string | undefined, // Custom download folder (absolute path) + preset: 'mp3', + skipExisting: false, + playlistMaxItems: undefined as number | undefined, + }, + 'exponential-volume': {}, + 'in-app-menu': {}, + 'last-fm': { + enabled: false, + token: undefined as string | undefined, // Token used for authentication + session_key: undefined as string | undefined, // Session key used for scrobbling + api_root: 'http://ws.audioscrobbler.com/2.0/', + api_key: '04d76faaac8726e60988e14c105d421a', // Api key registered by @semvis123 + secret: 'a5d2a36fdf64819290f6982481eaffa2', + }, + 'lyrics-genius': { + romanizedLyrics: false, + }, + 'navigation': { + enabled: true, + }, + 'no-google-login': {}, + 'notifications': { + enabled: false, + unpauseNotification: false, + urgency: 'normal', // Has effect only on Linux + // the following has effect only on Windows + interactive: true, + toastStyle: 1, // See plugins/notifications/utils for more info + refreshOnPlayPause: false, + trayControls: true, + hideButtonText: false, + }, + 'picture-in-picture': { + 'enabled': false, + 'alwaysOnTop': true, + 'savePosition': true, + 'saveSize': false, + 'hotkey': 'P', + 'pip-position': [10, 10], + 'pip-size': [450, 275], + 'isInPiP': false, + 'useNativePiP': false, + }, + 'playback-speed': {}, + 'precise-volume': { + enabled: false, + steps: 1, // Percentage of volume to change + arrowsShortcut: true, // Enable ArrowUp + ArrowDown local shortcuts + globalShortcuts: { + volumeUp: '', + volumeDown: '', + }, + savedVolume: undefined as number | undefined, // Plugin save volume between session here + }, + 'quality-changer': {}, 'shortcuts': { enabled: false, overrideMediaKeys: false, @@ -94,56 +179,8 @@ const defaultConfig = { next: '', } as Record, }, - 'downloader': { - enabled: false, - ffmpegArgs: ['-b:a', '256k'], // E.g. ["-b:a", "192k"] for an audio bitrate of 192kb/s - downloadFolder: undefined as string | undefined, // Custom download folder (absolute path) - preset: 'mp3', - skipExisting: false, - playlistMaxItems: undefined as number | undefined, - }, - 'last-fm': { - enabled: false, - token: undefined as string | undefined, // Token used for authentication - session_key: undefined as string | undefined, // Session key used for scrobbling - api_root: 'http://ws.audioscrobbler.com/2.0/', - api_key: '04d76faaac8726e60988e14c105d421a', // Api key registered by @semvis123 - secret: 'a5d2a36fdf64819290f6982481eaffa2', - }, - 'lyric-genius': { - romanizedLyrics: false, - }, - 'disable-autoplay': { - applyOnce: false, - }, - 'discord': { - enabled: false, - autoReconnect: true, // If enabled, will try to reconnect to discord every 5 seconds after disconnecting or failing to connect - activityTimoutEnabled: true, // If enabled, the discord rich presence gets cleared when music paused after the time specified below - activityTimoutTime: 10 * 60 * 1000, // 10 minutes - listenAlong: true, // Add a "listen along" button to rich presence - hideDurationLeft: false, // Hides the start and end time of the song to rich presence - }, - 'notifications': { - enabled: false, - unpauseNotification: false, - urgency: 'normal', // Has effect only on Linux - // the following has effect only on Windows - interactive: true, - toastStyle: 1, // See plugins/notifications/utils for more info - refreshOnPlayPause: false, - trayControls: true, - hideButtonText: false, - }, - 'precise-volume': { - enabled: false, - steps: 1, // Percentage of volume to change - arrowsShortcut: true, // Enable ArrowUp + ArrowDown local shortcuts - globalShortcuts: { - volumeUp: '', - volumeDown: '', - }, - savedVolume: undefined as number | undefined, // Plugin save volume between session here + 'skip-silences': { + onlySkipBeginning: false, }, 'sponsorblock': { enabled: false, @@ -157,6 +194,9 @@ const defaultConfig = { 'music_offtopic', ], }, + 'taskbar-mediacontrol': {}, + 'touchbar': {}, + 'tuna-obs': {}, 'video-toggle': { enabled: false, hideVideo: false, @@ -164,34 +204,6 @@ const defaultConfig = { forceHide: false, align: '', }, - 'picture-in-picture': { - 'enabled': false, - 'alwaysOnTop': true, - 'savePosition': true, - 'saveSize': false, - 'hotkey': 'P', - 'pip-position': [10, 10], - 'pip-size': [450, 275], - 'isInPiP': false, - 'useNativePiP': false, - }, - 'captions-selector': { - enabled: false, - disableCaptions: false, - autoload: false, - lastCaptionsCode: '', - disabledCaptions: false, - }, - 'skip-silences': { - onlySkipBeginning: false, - }, - 'crossfade': { - enabled: false, - fadeInDuration: 1500, // Ms - fadeOutDuration: 5000, // Ms - secondsBeforeEnd: 10, // S - fadeScaling: 'linear', // 'linear', 'logarithmic' or a positive number in dB - }, 'visualizer': { enabled: false, type: 'butterchurn', diff --git a/config/dynamic.ts b/config/dynamic.ts index c05e49c4..e9381bca 100644 --- a/config/dynamic.ts +++ b/config/dynamic.ts @@ -10,9 +10,9 @@ import { getOptions, setMenuOptions, setOptions } from './plugins'; import { sendToFront } from '../providers/app-controls'; import { Entries } from '../utils/type-utils'; -type DefaultPluginsConfig = typeof defaultConfig.plugins; -type OneOfDefaultConfigKey = keyof DefaultPluginsConfig; -type OneOfDefaultConfig = typeof defaultConfig.plugins[OneOfDefaultConfigKey]; +export type DefaultPluginsConfig = typeof defaultConfig.plugins; +export type OneOfDefaultConfigKey = keyof DefaultPluginsConfig; +export type OneOfDefaultConfig = typeof defaultConfig.plugins[OneOfDefaultConfigKey]; // eslint-disable-next-line @typescript-eslint/no-explicit-any const activePlugins: { [key in OneOfDefaultConfigKey]?: PluginConfig } = {}; diff --git a/index.ts b/index.ts index 5d744118..cfca5fff 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1,6 @@ import path from 'node:path'; -import { BrowserWindow, app, screen, globalShortcut, session, shell, dialog } from 'electron'; +import { BrowserWindow, app, screen, globalShortcut, session, shell, dialog, ipcMain } from 'electron'; import enhanceWebRequest from 'electron-better-web-request'; import is from 'electron-is'; import unhandled from 'electron-unhandled'; @@ -18,6 +18,29 @@ import { setupSongInfo } from './providers/song-info'; import { restart, setupAppControls } from './providers/app-controls'; import { APP_PROTOCOL, handleProtocol, setupProtocolHandler } from './providers/protocol-handler'; +import adblocker from './plugins/adblocker/back'; +import albumColorTheme from './plugins/album-color-theme/back'; +import blurNavigationBar from './plugins/blur-nav-bar/back'; +import captionsSelector from './plugins/captions-selector/back'; +import crossfade from './plugins/crossfade/back'; +import discord from './plugins/discord/back'; +import downloader from './plugins/downloader/back'; +import inAppMenu from './plugins/in-app-menu/back'; +import lastFm from './plugins/last-fm/back'; +import lyricsGenius from './plugins/lyrics-genius/back'; +import navigation from './plugins/navigation/back'; +import noGoogleLogin from './plugins/no-google-login/back'; +import notifications from './plugins/notifications/back'; +import pictureInPicture, { setOptions as pipSetOptions } from './plugins/picture-in-picture/back'; +import preciseVolume from './plugins/precise-volume/back'; +import qualityChanger from './plugins/quality-changer/back'; +import shortcuts from './plugins/shortcuts/back'; +import sponsorBlock from './plugins/sponsorblock/back'; +import taskbarMediaControl from './plugins/taskbar-mediacontrol/back'; +import touchbar from './plugins/touchbar/back'; +import tunaObs from './plugins/tuna-obs/back'; +import videoToggle from './plugins/video-toggle/back'; +import visualizer from './plugins/visualizer/back'; // Catch errors and log them unhandled({ @@ -75,6 +98,46 @@ function onClosed() { mainWindow = null; } +const mainPlugins = { + 'adblocker': adblocker, + 'album-color-theme': albumColorTheme, + 'blur-nav-bar': blurNavigationBar, + 'captions-selector': captionsSelector, + 'crossfade': crossfade, + 'discord': discord, + 'downloader': downloader, + 'in-app-menu': inAppMenu, + 'last-fm': lastFm, + 'lyrics-genius': lyricsGenius, + 'navigation': navigation, + 'no-google-login': noGoogleLogin, + 'notifications': notifications, + 'picture-in-picture': pictureInPicture, + 'precise-volume': preciseVolume, + 'quality-changer': qualityChanger, + 'shortcuts': shortcuts, + 'sponsorblock': sponsorBlock, + 'taskbar-mediacontrol': undefined as typeof taskbarMediaControl | undefined, + 'touchbar': undefined as typeof touchbar | undefined, + 'tuna-obs': tunaObs, + 'video-toggle': videoToggle, + 'visualizer': visualizer, +}; +export const mainPluginNames = Object.keys(mainPlugins); + +if (is.windows()) { + mainPlugins['taskbar-mediacontrol'] = taskbarMediaControl; + delete mainPlugins['touchbar']; +} else if (is.macOS()) { + mainPlugins['touchbar'] = touchbar; + delete mainPlugins['taskbar-mediacontrol']; +} else { + delete mainPlugins['touchbar']; + delete mainPlugins['taskbar-mediacontrol']; +} + +ipcMain.handle('get-main-plugin-names', () => Object.keys(mainPlugins)); + function loadPlugins(win: BrowserWindow) { injectCSS(win.webContents, path.join(__dirname, 'youtube-music.css')); // Load user CSS @@ -101,13 +164,17 @@ function loadPlugins(win: BrowserWindow) { }); for (const [plugin, options] of config.plugins.getEnabled()) { - console.log('Loaded plugin - ' + plugin); - const pluginPath = path.join(__dirname, 'plugins', plugin, 'back.js'); - fileExists(pluginPath, () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-unsafe-member-access - const handle = require(pluginPath).default as (window: BrowserWindow, option: typeof options) => void; - handle(win, options); - }); + try { + if (Object.hasOwn(mainPlugins, plugin)) { + console.log('Loaded plugin - ' + plugin); + const handler = mainPlugins[plugin as keyof typeof mainPlugins]; + if (handler) { + handler(win, options as never); + } + } + } catch (e) { + console.error(`Failed to load plugin "${plugin}"`, e); + } } } @@ -191,8 +258,7 @@ function createMainWindow() { type PiPOptions = typeof config.defaultConfig.plugins['picture-in-picture']; const setPiPOptions = config.plugins.isEnabled('picture-in-picture') // eslint-disable-next-line @typescript-eslint/no-var-requires - ? (key: string, value: unknown) => (require('./plugins/picture-in-picture/back') as typeof import('./plugins/picture-in-picture/back')) - .setOptions({ [key]: value }) + ? (key: string, value: unknown) => pipSetOptions({ [key]: value }) : () => {}; win.on('move', () => { diff --git a/menu.ts b/menu.ts index 66ac1db0..661095a2 100644 --- a/menu.ts +++ b/menu.ts @@ -1,21 +1,44 @@ -import { existsSync } from 'node:fs'; -import path from 'node:path'; - import is from 'electron-is'; import { app, BrowserWindow, clipboard, dialog, Menu } from 'electron'; import prompt from 'custom-electron-prompt'; import { restart } from './providers/app-controls'; -import { getAllPlugins } from './plugins/utils'; import config from './config'; import { startingPages } from './providers/extracted-data'; import promptOptions from './providers/prompt-options'; -export type MenuTemplate = (Electron.MenuItemConstructorOptions | Electron.MenuItem)[]; +import adblockerMenu from './plugins/adblocker/menu'; +import captionsSelectorMenu from './plugins/captions-selector/menu'; +import crossfadeMenu from './plugins/crossfade/menu'; +import discordMenu from './plugins/discord/menu'; +import downloaderMenu from './plugins/downloader/menu'; +import lyricsGeniusMenu from './plugins/lyrics-genius/menu'; +import notificationsMenu from './plugins/notifications/menu'; +import preciseVolumeMenu from './plugins/precise-volume/menu'; +import shortcutsMenu from './plugins/shortcuts/menu'; +import videoToggleMenu from './plugins/video-toggle/menu'; +import visualizerMenu from './plugins/visualizer/menu'; +import { getAvailablePluginNames } from './plugins/utils'; + +export type MenuTemplate = Electron.MenuItemConstructorOptions[]; // True only if in-app-menu was loaded on launch const inAppMenuActive = config.plugins.isEnabled('in-app-menu'); +const pluginMenus = { + 'adblocker': adblockerMenu, + 'captions-selector': captionsSelectorMenu, + 'crossfade': crossfadeMenu, + 'discord': discordMenu, + 'downloader': downloaderMenu, + 'lyrics-genius': lyricsGeniusMenu, + 'notifications': notificationsMenu, + 'precise-volume': preciseVolumeMenu, + 'shortcuts': shortcutsMenu, + 'video-toggle': videoToggleMenu, + 'visualizer': visualizerMenu, +}; + const pluginEnabledMenu = (plugin: string, label = '', hasSubmenu = false, refreshMenu: (() => void ) | undefined = undefined): Electron.MenuItemConstructorOptions => ({ label: label || plugin, type: 'checkbox', @@ -45,33 +68,30 @@ export const mainMenuTemplate = (win: BrowserWindow): MenuTemplate => { { label: 'Plugins', submenu: - getAllPlugins().map((plugin) => { - const pluginPath = path.join(__dirname, 'plugins', plugin, 'menu.js'); - if (existsSync(pluginPath)) { - let pluginLabel = plugin; + getAvailablePluginNames().map((pluginName) => { + if (Object.hasOwn(pluginMenus, pluginName)) { + const getPluginMenu = pluginMenus[pluginName as keyof typeof pluginMenus]; + + let pluginLabel = pluginName; if (pluginLabel === 'crossfade') { pluginLabel = 'crossfade [beta]'; } - if (!config.plugins.isEnabled(plugin)) { - return pluginEnabledMenu(plugin, pluginLabel, true, refreshMenu); + if (!config.plugins.isEnabled(pluginName)) { + return pluginEnabledMenu(pluginName, pluginLabel, true, refreshMenu); } - type PluginType = (window: BrowserWindow, plugins: string, func: () => void) => Electron.MenuItemConstructorOptions[]; - - // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-unsafe-member-access - const getPluginMenu = require(pluginPath).default as PluginType; return { label: pluginLabel, submenu: [ - pluginEnabledMenu(plugin, 'Enabled', true, refreshMenu), + pluginEnabledMenu(pluginName, 'Enabled', true, refreshMenu), { type: 'separator' }, - ...getPluginMenu(win, config.plugins.getOptions(plugin), refreshMenu), + ...getPluginMenu(win, config.plugins.getOptions(pluginName), refreshMenu), ], } satisfies Electron.MenuItemConstructorOptions; } - return pluginEnabledMenu(plugin); + return pluginEnabledMenu(pluginName); }), }, { diff --git a/plugins/adblocker/inject-cliqz-preload.ts b/plugins/adblocker/inject-cliqz-preload.ts new file mode 100644 index 00000000..0d0d7e71 --- /dev/null +++ b/plugins/adblocker/inject-cliqz-preload.ts @@ -0,0 +1,3 @@ +export default () => { + require('@cliqz/adblocker-electron-preload'); +}; diff --git a/plugins/adblocker/inject.d.ts b/plugins/adblocker/inject.d.ts new file mode 100644 index 00000000..cda88ca4 --- /dev/null +++ b/plugins/adblocker/inject.d.ts @@ -0,0 +1,3 @@ +const inject: () => void; + +export default inject; diff --git a/plugins/adblocker/inject.js b/plugins/adblocker/inject.js index 513bc960..ccc9ea83 100644 --- a/plugins/adblocker/inject.js +++ b/plugins/adblocker/inject.js @@ -7,428 +7,429 @@ Parts of this code is derived from set-constant.js: https://github.com/gorhill/uBlock/blob/5de0ce975753b7565759ac40983d31978d1f84ca/assets/resources/scriptlets.js#L704 */ - -{ - const pruner = function (o) { - delete o.playerAds; - delete o.adPlacements; - // - if (o.playerResponse) { - delete o.playerResponse.playerAds; - delete o.playerResponse.adPlacements; - } - - // - return o; - }; - - JSON.parse = new Proxy(JSON.parse, { - apply() { - return pruner(Reflect.apply(...arguments)); - }, - }); - - Response.prototype.json = new Proxy(Response.prototype.json, { - apply() { - return Reflect.apply(...arguments).then((o) => pruner(o)); - }, - }); -} - -(function () { - let cValue = 'undefined'; - const chain = 'playerResponse.adPlacements'; - const thisScript = document.currentScript; - // - switch (cValue) { - case 'null': { - cValue = null; - break; - } - - case "''": { - cValue = ''; - break; - } - - case 'true': { - cValue = true; - break; - } - - case 'false': { - cValue = false; - break; - } - - case 'undefined': { - cValue = undefined; - break; - } - - case 'noopFunc': { - cValue = function () { - }; - - break; - } - - case 'trueFunc': { - cValue = function () { - return true; - }; - - break; - } - - case 'falseFunc': { - cValue = function () { - return false; - }; - - break; - } - - default: { - if (/^\d+$/.test(cValue)) { - cValue = Number.parseFloat(cValue); - // - if (isNaN(cValue)) { - return; - } - - if (Math.abs(cValue) > 0x7F_FF) { - return; - } - } else { - return; - } - } - } - - // - let aborted = false; - const mustAbort = function (v) { - if (aborted) { - return true; - } - - aborted - = v !== undefined - && v !== null - && cValue !== undefined - && cValue !== null - && typeof v !== typeof cValue; - return aborted; - }; - - /* - Support multiple trappers for the same property: - https://github.com/uBlockOrigin/uBlock-issues/issues/156 - */ - - const trapProp = function (owner, prop, configurable, handler) { - if (handler.init(owner[prop]) === false) { - return; - } - - // - const odesc = Object.getOwnPropertyDescriptor(owner, prop); - let previousGetter; - let previousSetter; - if (odesc instanceof Object) { - if (odesc.configurable === false) { - return; +module.exports = () => { + { + const pruner = function (o) { + delete o.playerAds; + delete o.adPlacements; + // + if (o.playerResponse) { + delete o.playerResponse.playerAds; + delete o.playerResponse.adPlacements; } - if (odesc.get instanceof Function) { - previousGetter = odesc.get; - } + // + return o; + }; - if (odesc.set instanceof Function) { - previousSetter = odesc.set; - } - } - - // - Object.defineProperty(owner, prop, { - configurable, - get() { - if (previousGetter !== undefined) { - previousGetter(); - } - - // - return handler.getter(); - }, - set(a) { - if (previousSetter !== undefined) { - previousSetter(a); - } - - // - handler.setter(a); + JSON.parse = new Proxy(JSON.parse, { + apply() { + return pruner(Reflect.apply(...arguments)); }, }); - }; - const trapChain = function (owner, chain) { - const pos = chain.indexOf('.'); - if (pos === -1) { - trapProp(owner, chain, false, { - v: undefined, - getter() { - return document.currentScript === thisScript ? this.v : cValue; - }, - setter(a) { - if (mustAbort(a) === false) { + Response.prototype.json = new Proxy(Response.prototype.json, { + apply() { + return Reflect.apply(...arguments).then((o) => pruner(o)); + }, + }); + } + + (function () { + let cValue = 'undefined'; + const chain = 'playerResponse.adPlacements'; + const thisScript = document.currentScript; + // + switch (cValue) { + case 'null': { + cValue = null; + break; + } + + case "''": { + cValue = ''; + break; + } + + case 'true': { + cValue = true; + break; + } + + case 'false': { + cValue = false; + break; + } + + case 'undefined': { + cValue = undefined; + break; + } + + case 'noopFunc': { + cValue = function () { + }; + + break; + } + + case 'trueFunc': { + cValue = function () { + return true; + }; + + break; + } + + case 'falseFunc': { + cValue = function () { + return false; + }; + + break; + } + + default: { + if (/^\d+$/.test(cValue)) { + cValue = Number.parseFloat(cValue); + // + if (isNaN(cValue)) { return; } - cValue = a; - }, - init(v) { - if (mustAbort(v)) { - return false; + if (Math.abs(cValue) > 0x7F_FF) { + return; + } + } else { + return; + } + } + } + + // + let aborted = false; + const mustAbort = function (v) { + if (aborted) { + return true; + } + + aborted + = v !== undefined + && v !== null + && cValue !== undefined + && cValue !== null + && typeof v !== typeof cValue; + return aborted; + }; + + /* + Support multiple trappers for the same property: + https://github.com/uBlockOrigin/uBlock-issues/issues/156 + */ + + const trapProp = function (owner, prop, configurable, handler) { + if (handler.init(owner[prop]) === false) { + return; + } + + // + const odesc = Object.getOwnPropertyDescriptor(owner, prop); + let previousGetter; + let previousSetter; + if (odesc instanceof Object) { + if (odesc.configurable === false) { + return; + } + + if (odesc.get instanceof Function) { + previousGetter = odesc.get; + } + + if (odesc.set instanceof Function) { + previousSetter = odesc.set; + } + } + + // + Object.defineProperty(owner, prop, { + configurable, + get() { + if (previousGetter !== undefined) { + previousGetter(); } // + return handler.getter(); + }, + set(a) { + if (previousSetter !== undefined) { + previousSetter(a); + } + + // + handler.setter(a); + }, + }); + }; + + const trapChain = function (owner, chain) { + const pos = chain.indexOf('.'); + if (pos === -1) { + trapProp(owner, chain, false, { + v: undefined, + getter() { + return document.currentScript === thisScript ? this.v : cValue; + }, + setter(a) { + if (mustAbort(a) === false) { + return; + } + + cValue = a; + }, + init(v) { + if (mustAbort(v)) { + return false; + } + + // + this.v = v; + return true; + }, + }); + // + return; + } + + // + const prop = chain.slice(0, pos); + const v = owner[prop]; + // + chain = chain.slice(pos + 1); + if (v instanceof Object || (typeof v === 'object' && v !== null)) { + trapChain(v, chain); + return; + } + + // + trapProp(owner, prop, true, { + v: undefined, + getter() { + return this.v; + }, + setter(a) { + this.v = a; + if (a instanceof Object) { + trapChain(a, chain); + } + }, + init(v) { this.v = v; return true; }, }); - // - return; - } + }; // - const prop = chain.slice(0, pos); - const v = owner[prop]; + trapChain(window, chain); + })(); + + (function () { + let cValue = 'undefined'; + const thisScript = document.currentScript; + const chain = 'ytInitialPlayerResponse.adPlacements'; // - chain = chain.slice(pos + 1); - if (v instanceof Object || (typeof v === 'object' && v !== null)) { - trapChain(v, chain); - return; - } - - // - trapProp(owner, prop, true, { - v: undefined, - getter() { - return this.v; - }, - setter(a) { - this.v = a; - if (a instanceof Object) { - trapChain(a, chain); - } - }, - init(v) { - this.v = v; - return true; - }, - }); - }; - - // - trapChain(window, chain); -})(); - -(function () { - let cValue = 'undefined'; - const thisScript = document.currentScript; - const chain = 'ytInitialPlayerResponse.adPlacements'; - // - switch (cValue) { - case 'null': { - cValue = null; - break; - } - - case "''": { - cValue = ''; - break; - } - - case 'true': { - cValue = true; - break; - } - - case 'false': { - cValue = false; - break; - } - - case 'undefined': { - cValue = undefined; - break; - } - - case 'noopFunc': { - cValue = function () { - }; - - break; - } - - case 'trueFunc': { - cValue = function () { - return true; - }; - - break; - } - - case 'falseFunc': { - cValue = function () { - return false; - }; - - break; - } - - default: { - if (/^\d+$/.test(cValue)) { - cValue = Number.parseFloat(cValue); - // - if (isNaN(cValue)) { - return; - } - - if (Math.abs(cValue) > 0x7F_FF) { - return; - } - } else { - return; - } - } - } - - // - let aborted = false; - const mustAbort = function (v) { - if (aborted) { - return true; - } - - aborted - = v !== undefined - && v !== null - && cValue !== undefined - && cValue !== null - && typeof v !== typeof cValue; - return aborted; - }; - - /* - Support multiple trappers for the same property: - https://github.com/uBlockOrigin/uBlock-issues/issues/156 - */ - - const trapProp = function (owner, prop, configurable, handler) { - if (handler.init(owner[prop]) === false) { - return; - } - - // - const odesc = Object.getOwnPropertyDescriptor(owner, prop); - let previousGetter; - let previousSetter; - if (odesc instanceof Object) { - if (odesc.configurable === false) { - return; + switch (cValue) { + case 'null': { + cValue = null; + break; } - if (odesc.get instanceof Function) { - previousGetter = odesc.get; + case "''": { + cValue = ''; + break; } - if (odesc.set instanceof Function) { - previousSetter = odesc.set; + case 'true': { + cValue = true; + break; } - } - // - Object.defineProperty(owner, prop, { - configurable, - get() { - if (previousGetter !== undefined) { - previousGetter(); - } + case 'false': { + cValue = false; + break; + } - // - return handler.getter(); - }, - set(a) { - if (previousSetter !== undefined) { - previousSetter(a); - } + case 'undefined': { + cValue = undefined; + break; + } - // - handler.setter(a); - }, - }); - }; + case 'noopFunc': { + cValue = function () { + }; - const trapChain = function (owner, chain) { - const pos = chain.indexOf('.'); - if (pos === -1) { - trapProp(owner, chain, false, { - v: undefined, - getter() { - return document.currentScript === thisScript ? this.v : cValue; - }, - setter(a) { - if (mustAbort(a) === false) { + break; + } + + case 'trueFunc': { + cValue = function () { + return true; + }; + + break; + } + + case 'falseFunc': { + cValue = function () { + return false; + }; + + break; + } + + default: { + if (/^\d+$/.test(cValue)) { + cValue = Number.parseFloat(cValue); + // + if (isNaN(cValue)) { return; } - cValue = a; - }, - init(v) { - if (mustAbort(v)) { - return false; + if (Math.abs(cValue) > 0x7F_FF) { + return; + } + } else { + return; + } + } + } + + // + let aborted = false; + const mustAbort = function (v) { + if (aborted) { + return true; + } + + aborted + = v !== undefined + && v !== null + && cValue !== undefined + && cValue !== null + && typeof v !== typeof cValue; + return aborted; + }; + + /* + Support multiple trappers for the same property: + https://github.com/uBlockOrigin/uBlock-issues/issues/156 + */ + + const trapProp = function (owner, prop, configurable, handler) { + if (handler.init(owner[prop]) === false) { + return; + } + + // + const odesc = Object.getOwnPropertyDescriptor(owner, prop); + let previousGetter; + let previousSetter; + if (odesc instanceof Object) { + if (odesc.configurable === false) { + return; + } + + if (odesc.get instanceof Function) { + previousGetter = odesc.get; + } + + if (odesc.set instanceof Function) { + previousSetter = odesc.set; + } + } + + // + Object.defineProperty(owner, prop, { + configurable, + get() { + if (previousGetter !== undefined) { + previousGetter(); } // + return handler.getter(); + }, + set(a) { + if (previousSetter !== undefined) { + previousSetter(a); + } + + // + handler.setter(a); + }, + }); + }; + + const trapChain = function (owner, chain) { + const pos = chain.indexOf('.'); + if (pos === -1) { + trapProp(owner, chain, false, { + v: undefined, + getter() { + return document.currentScript === thisScript ? this.v : cValue; + }, + setter(a) { + if (mustAbort(a) === false) { + return; + } + + cValue = a; + }, + init(v) { + if (mustAbort(v)) { + return false; + } + + // + this.v = v; + return true; + }, + }); + // + return; + } + + // + const prop = chain.slice(0, pos); + const v = owner[prop]; + // + chain = chain.slice(pos + 1); + if (v instanceof Object || (typeof v === 'object' && v !== null)) { + trapChain(v, chain); + return; + } + + // + trapProp(owner, prop, true, { + v: undefined, + getter() { + return this.v; + }, + setter(a) { + this.v = a; + if (a instanceof Object) { + trapChain(a, chain); + } + }, + init(v) { this.v = v; return true; }, }); - // - return; - } + }; // - const prop = chain.slice(0, pos); - const v = owner[prop]; - // - chain = chain.slice(pos + 1); - if (v instanceof Object || (typeof v === 'object' && v !== null)) { - trapChain(v, chain); - return; - } - - // - trapProp(owner, prop, true, { - v: undefined, - getter() { - return this.v; - }, - setter(a) { - this.v = a; - if (a instanceof Object) { - trapChain(a, chain); - } - }, - init(v) { - this.v = v; - return true; - }, - }); - }; - - // - trapChain(window, chain); -})(); + trapChain(window, chain); + })(); +}; diff --git a/plugins/adblocker/menu.ts b/plugins/adblocker/menu.ts index 1e8f43e0..92651424 100644 --- a/plugins/adblocker/menu.ts +++ b/plugins/adblocker/menu.ts @@ -1,6 +1,8 @@ import config, { blockers } from './config'; -export default () => { +import { MenuTemplate } from '../../menu'; + +export default (): MenuTemplate => { return [ { label: 'Blocker', diff --git a/plugins/adblocker/preload.ts b/plugins/adblocker/preload.ts index 33cb6b14..924728ce 100644 --- a/plugins/adblocker/preload.ts +++ b/plugins/adblocker/preload.ts @@ -1,11 +1,13 @@ import config from './config'; +import inject from './inject'; +import injectCliqzPreload from './inject-cliqz-preload'; export default async () => { if (await config.shouldUseBlocklists()) { // Preload adblocker to inject scripts/styles - require('@cliqz/adblocker-electron-preload'); + injectCliqzPreload(); // eslint-disable-next-line @typescript-eslint/await-thenable } else if ((await config.get('blocker')) === config.blockers.InPlayer) { - require('./inject.js'); + inject(); } }; diff --git a/plugins/album-color-theme/front.ts b/plugins/album-color-theme/front.ts index 4c095baa..0400586a 100644 --- a/plugins/album-color-theme/front.ts +++ b/plugins/album-color-theme/front.ts @@ -1,5 +1,7 @@ import { ipcRenderer } from 'electron'; +import { ConfigType } from '../../config/dynamic'; + import type { FastAverageColorResult } from 'fast-average-color'; function hexToHSL(H: string) { @@ -71,7 +73,7 @@ function changeElementColor(element: HTMLElement | null, hue: number, saturation } } -export default () => { +export default (_: ConfigType<'album-color-theme'>) => { const observer = new MutationObserver((mutationsList) => { for (const mutation of mutationsList) { if (mutation.type === 'attributes') { diff --git a/plugins/crossfade/menu.ts b/plugins/crossfade/menu.ts index fbfa4f0b..d20d9def 100644 --- a/plugins/crossfade/menu.ts +++ b/plugins/crossfade/menu.ts @@ -7,11 +7,13 @@ import config from './config'; import promptOptions from '../../providers/prompt-options'; import configOptions from '../../config/defaults'; +import { MenuTemplate } from '../../menu'; + import type { ConfigType } from '../../config/dynamic'; const defaultOptions = configOptions.plugins.crossfade; -export default (win: BrowserWindow) => [ +export default (win: BrowserWindow): MenuTemplate => [ { label: 'Advanced', async click() { diff --git a/plugins/discord/menu.ts b/plugins/discord/menu.ts index a8ea14c6..4bc6983c 100644 --- a/plugins/discord/menu.ts +++ b/plugins/discord/menu.ts @@ -7,6 +7,7 @@ import { clear, connect, isConnected, registerRefresh } from './back'; import { setMenuOptions } from '../../config/plugins'; import promptOptions from '../../providers/prompt-options'; import { singleton } from '../../providers/decorators'; +import { MenuTemplate } from '../../menu'; import type { ConfigType } from '../../config/dynamic'; @@ -16,14 +17,14 @@ const registerRefreshOnce = singleton((refreshMenu: () => void) => { type DiscordOptions = ConfigType<'discord'>; -export default (win: Electron.BrowserWindow, options: DiscordOptions, refreshMenu: () => void) => { +export default (win: Electron.BrowserWindow, options: DiscordOptions, refreshMenu: () => void): MenuTemplate => { registerRefreshOnce(refreshMenu); return [ { label: isConnected() ? 'Connected' : 'Reconnect', enabled: !isConnected(), - click: connect, + click: () => connect(), }, { label: 'Auto reconnect', diff --git a/plugins/lyrics-genius/back.ts b/plugins/lyrics-genius/back.ts index a4da0d3d..7c3c9946 100644 --- a/plugins/lyrics-genius/back.ts +++ b/plugins/lyrics-genius/back.ts @@ -15,7 +15,7 @@ import type { ConfigType } from '../../config/dynamic'; const eastAsianChars = /\p{Script=Katakana}|\p{Script=Hiragana}|\p{Script=Hangul}|\p{Script=Han}/u; let revRomanized = false; -export type LyricGeniusType = ConfigType<'lyric-genius'>; +export type LyricGeniusType = ConfigType<'lyrics-genius'>; export default (win: BrowserWindow, options: LyricGeniusType) => { if (options.romanizedLyrics) { diff --git a/plugins/lyrics-genius/menu.ts b/plugins/lyrics-genius/menu.ts index 9e5eb9dc..09664f38 100644 --- a/plugins/lyrics-genius/menu.ts +++ b/plugins/lyrics-genius/menu.ts @@ -3,8 +3,9 @@ import { BrowserWindow, MenuItem } from 'electron'; import { LyricGeniusType, toggleRomanized } from './back'; import { setOptions } from '../../config/plugins'; +import { MenuTemplate } from '../../menu'; -export default (_: BrowserWindow, options: LyricGeniusType) => [ +export default (_: BrowserWindow, options: LyricGeniusType): MenuTemplate => [ { label: 'Romanized Lyrics', type: 'checkbox', diff --git a/plugins/navigation/actions.ts b/plugins/navigation/actions.ts deleted file mode 100644 index 32813956..00000000 --- a/plugins/navigation/actions.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Actions, triggerAction } from '../utils'; - -export const CHANNEL = 'navigation'; -export const ACTIONS = Actions; - -export function goToNextPage() { - triggerAction(CHANNEL, Actions.NEXT); -} -// for HTML -// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-explicit-any -(global as any).goToNextPage = goToNextPage; - -export function goToPreviousPage() { - triggerAction(CHANNEL, Actions.BACK); -} -// for HTML -// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-explicit-any -(global as any).goToPreviousPage = goToPreviousPage; - -export default { - CHANNEL, - ACTIONS, - actions: { - goToNextPage, - goToPreviousPage, - }, -}; diff --git a/plugins/navigation/back.ts b/plugins/navigation/back.ts index bdf7e77d..aac7eb59 100644 --- a/plugins/navigation/back.ts +++ b/plugins/navigation/back.ts @@ -2,38 +2,12 @@ import path from 'node:path'; import { BrowserWindow } from 'electron'; -import { ACTIONS, CHANNEL } from './actions'; - -import { injectCSS, listenAction } from '../utils'; +import { injectCSS } from '../utils'; export function handle(win: BrowserWindow) { injectCSS(win.webContents, path.join(__dirname, 'style.css'), () => { win.webContents.send('navigation-css-ready'); }); - - listenAction(CHANNEL, (_, action) => { - switch (action) { - case ACTIONS.NEXT: { - if (win.webContents.canGoForward()) { - win.webContents.goForward(); - } - - break; - } - - case ACTIONS.BACK: { - if (win.webContents.canGoBack()) { - win.webContents.goBack(); - } - - break; - } - - default: { - console.log('Unknown action: ' + action); - } - } - }); } export default handle; diff --git a/plugins/navigation/templates/back.html b/plugins/navigation/templates/back.html index 083cf380..a07c46bd 100644 --- a/plugins/navigation/templates/back.html +++ b/plugins/navigation/templates/back.html @@ -1,6 +1,6 @@