From 817b48dc9dcd5d1841cdc35c39360d89fc1d1435 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Fri, 6 Aug 2021 21:42:35 +0000 Subject: [PATCH 01/36] fix: upgrade electron-updater from 4.4.0 to 4.4.1 Snyk has created this PR to upgrade electron-updater from 4.4.0 to 4.4.1. See this package in npm: See this project in Snyk: https://app.snyk.io/org/th-ch/project/81809c53-bb7b-46b9-a0d7-806d45d74ac6?utm_source=github&utm_medium=upgrade-pr --- package.json | 2 +- yarn.lock | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index a2db61fa..7334d66c 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "electron-localshortcut": "^3.2.1", "electron-store": "^7.0.3", "electron-unhandled": "^3.0.2", - "electron-updater": "^4.3.10", + "electron-updater": "^4.4.1", "filenamify": "^4.3.0", "md5": "^2.3.0", "node-fetch": "^2.6.1", diff --git a/yarn.lock b/yarn.lock index 187191be..aeabc6e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2270,6 +2270,14 @@ buffer@^5.1.0, buffer@^5.2.0, buffer@^5.2.1, buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" +builder-util-runtime@8.7.10: + version "8.7.10" + resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.7.10.tgz#6e661bb1cdaae66e32b2111253577dd631a9ee21" + integrity sha512-zelTRebsOsj33pF+Jf/qwpvx9W6CeMQshqaRa70Ii6+NQGsspMXqlKDQb+1lvTv9aWARxa3+jy/syzm8jTE8Kw== + dependencies: + debug "^4.3.2" + sax "^1.2.4" + builder-util-runtime@8.7.6: version "8.7.6" resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.7.6.tgz#4b43c96db2bd494ced7694bcd7674934655e8324" @@ -3437,13 +3445,13 @@ electron-unhandled@^3.0.2: ensure-error "^2.0.0" lodash.debounce "^4.0.8" -electron-updater@^4.3.10: - version "4.4.0" - resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.4.0.tgz#c1361dc0b695c9274d8f61c441296eaa2fafdd50" - integrity sha512-D+cQ8fzKb8QphMc5lX65XxuFVhOPbCuKEgkf2GUMVZNSh/xQ5JTghgtGDQlyJ3ZNru87I3P0qsYv/kzdC9en2w== +electron-updater@^4.4.1: + version "4.4.3" + resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.4.3.tgz#9447943549639592ce7eeaf654c7e6b9efd20e35" + integrity sha512-1wJbcFAEvExgiU846hUoQK3QPPbaNQZrbPRaFw9TWUThojbxza34Yt1FaL0/tnLoKQ5N3eKjYcrN9KP1EpO/yw== dependencies: "@types/semver" "^7.3.6" - builder-util-runtime "8.7.7" + builder-util-runtime "8.7.10" fs-extra "^10.0.0" js-yaml "^4.1.0" lazy-val "^1.0.5" From 09fe80cae7c6798bdef63c1c2be9dbe3ba1371a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Aug 2021 03:24:48 +0000 Subject: [PATCH 02/36] Bump path-parse from 1.0.6 to 1.0.7 Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 187191be..05851ef8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7151,9 +7151,9 @@ path-key@^3.0.0, path-key@^3.1.0: integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-type@^1.0.0: version "1.1.0" From 183bad43f662ffc294be57548720eb09c9fa0cbb Mon Sep 17 00:00:00 2001 From: Constantin Piber Date: Sun, 15 Aug 2021 12:20:37 +0200 Subject: [PATCH 03/36] Fix discord clearActivity, menu The callback sends multiple events, in particular two pause when going to the next song, so the timeout wasn't properly cleared. Add menu buttons for the two options --- plugins/discord/back.js | 13 +++++++++---- plugins/discord/menu.js | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 plugins/discord/menu.js diff --git a/plugins/discord/back.js b/plugins/discord/back.js index c6faadd7..2f75c430 100644 --- a/plugins/discord/back.js +++ b/plugins/discord/back.js @@ -16,6 +16,10 @@ module.exports = (win, {activityTimoutEnabled, activityTimoutTime}) => { win.once("ready-to-show", () => { rpc.once("ready", () => { // Register the callback + // + // We get multiple events + // Next song: PAUSE(n), PAUSE(n+1), PLAY(n+1) + // Skip time: PAUSE(N), PLAY(N) registerCallback((songInfo) => { if (songInfo.title.length === 0 && songInfo.artist.length === 0) { return; @@ -31,16 +35,17 @@ module.exports = (win, {activityTimoutEnabled, activityTimoutTime}) => { ].join(' || '), }; + // stop the clear activity timout + clearTimeout(clearActivity); + if (songInfo.isPaused) { // Add an idle icon to show that the song is paused activityInfo.smallImageKey = "idle"; activityInfo.smallImageText = "idle/paused"; // Set start the timer so the activity gets cleared after a while if enabled if (activityTimoutEnabled) - clearActivity = setTimeout(()=>rpc.clearActivity(), activityTimoutTime||10000); + clearActivity = setTimeout(() => rpc.clearActivity().catch(console.error), activityTimoutTime || 10000); } else { - // stop the clear activity timout - clearTimeout(clearActivity); // Add the start and end time of the song const songStartTime = Date.now() - songInfo.elapsedSeconds * 1000; activityInfo.startTimestamp = songStartTime; @@ -48,7 +53,7 @@ module.exports = (win, {activityTimoutEnabled, activityTimoutTime}) => { songStartTime + songInfo.songDuration * 1000; } - rpc.setActivity(activityInfo); + rpc.setActivity(activityInfo).catch(console.error); }); }); diff --git a/plugins/discord/menu.js b/plugins/discord/menu.js new file mode 100644 index 00000000..d0af48e8 --- /dev/null +++ b/plugins/discord/menu.js @@ -0,0 +1,21 @@ +const { setOptions } = require("../../config/plugins"); +const { edit } = require("../../config"); + +module.exports = (win, options) => [ + { + label: "Clear activity after timeout", + type: "checkbox", + checked: options.activityTimoutEnabled, + click: (item) => { + options.activityTimoutEnabled = item.checked; + setOptions('discord', options); + }, + }, + { + label: "Set timeout time in config", + click: () => { + // open config.json + edit(); + }, + }, +]; From 52f4e9d796a70c5470f051ab5f106c3ce13ff6e8 Mon Sep 17 00:00:00 2001 From: konhi#1588 Date: Mon, 16 Aug 2021 18:49:15 +0200 Subject: [PATCH 04/36] List missing plugins --- readme.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 7df27f0c..bd4ce62b 100644 --- a/readme.md +++ b/readme.md @@ -36,7 +36,7 @@ Install the `youtube-music-bin` package from the AUR. For AUR installation instr ## Available plugins: - **Ad Blocker**: block all ads and tracking out of the box -- **Downloader**: download to MP3 directly from the interface (youtube-dl) +- **Downloader**: download to MP3 directly from the interface [(youtube-dl)](https://github.com/ytdl-org/youtube-dl) - **No Google Login**: remove Google login buttons and links from the interface - **Shortcuts**: use your usual shortcuts (media keys, Ctrl/CMD + F…) to control YouTube Music - **Navigation**: next/back navigation arrows directly integrated in the interface, like in your favorite browser @@ -44,6 +44,13 @@ Install the `youtube-music-bin` package from the AUR. For AUR installation instr - **Hide video player**: no video in the interface when playing music - **Notifications**: display a notification when a song starts playing - **Touchbar**: custom TouchBar layout for macOS +- [**Discord**](https://discord.com/): show your friends what you listen to with [Rich Presence](https://user-images.githubusercontent.com/28219076/104362104-a7a0b980-5513-11eb-9744-bb89eabe0016.png) +- **In-app menu**: control app from your tray +- [**Last.fm**](https://www.last.fm/): scrobbles support +- **Playback speed**: listen fast, listen slow! +- **Precise volume**: more control over the volume for more comfort +- [**SponsorBlock**](https://github.com/ajayyy/SponsorBlock): skips non-music parts +- **Taskbar media control**: control app from your [Windows taskbar](https://user-images.githubusercontent.com/78568641/111916130-24a35e80-8a82-11eb-80c8-5021c1aa27f4.png) ## Dev From 39014572180798772c0a9a464c2bf43fb7d417ce Mon Sep 17 00:00:00 2001 From: Constantin Piber Date: Tue, 17 Aug 2021 10:09:11 +0200 Subject: [PATCH 05/36] Discord add menu button for clearing activity --- plugins/discord/back.js | 2 ++ plugins/discord/menu.js | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/plugins/discord/back.js b/plugins/discord/back.js index 2f75c430..57d9902a 100644 --- a/plugins/discord/back.js +++ b/plugins/discord/back.js @@ -61,3 +61,5 @@ module.exports = (win, {activityTimoutEnabled, activityTimoutTime}) => { rpc.login({ clientId }).catch(console.error); }); }; + +module.exports.clear = () => rpc.clearActivity(); diff --git a/plugins/discord/menu.js b/plugins/discord/menu.js index d0af48e8..96e25e8c 100644 --- a/plugins/discord/menu.js +++ b/plugins/discord/menu.js @@ -1,7 +1,14 @@ const { setOptions } = require("../../config/plugins"); const { edit } = require("../../config"); +const { clear } = require("./back"); module.exports = (win, options) => [ + { + label: "Clear activity", + click: () => { + clear(); + }, + }, { label: "Clear activity after timeout", type: "checkbox", From 36bc9c62b0e964dd8cbc1ad964ae570c0fe7566a Mon Sep 17 00:00:00 2001 From: Constantin Piber Date: Wed, 18 Aug 2021 21:39:40 +0200 Subject: [PATCH 06/36] Discord timeout 0 clear activity directly --- plugins/discord/back.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/discord/back.js b/plugins/discord/back.js index 57d9902a..c0808e4e 100644 --- a/plugins/discord/back.js +++ b/plugins/discord/back.js @@ -38,6 +38,12 @@ module.exports = (win, {activityTimoutEnabled, activityTimoutTime}) => { // stop the clear activity timout clearTimeout(clearActivity); + // clear directly if timeout is 0 + if (songInfo.isPaused && activityTimoutEnabled && activityTimoutTime === 0) { + rpc.clearActivity().catch(console.error); + return; + } + if (songInfo.isPaused) { // Add an idle icon to show that the song is paused activityInfo.smallImageKey = "idle"; From 6040fe1cbd0abe3299ac4c585c4c8fbd0a779b02 Mon Sep 17 00:00:00 2001 From: konhi Date: Thu, 19 Aug 2021 00:08:17 +0200 Subject: [PATCH 07/36] update descriptions and add images --- readme.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/readme.md b/readme.md index bd4ce62b..39d5889c 100644 --- a/readme.md +++ b/readme.md @@ -36,19 +36,19 @@ Install the `youtube-music-bin` package from the AUR. For AUR installation instr ## Available plugins: - **Ad Blocker**: block all ads and tracking out of the box -- **Downloader**: download to MP3 directly from the interface [(youtube-dl)](https://github.com/ytdl-org/youtube-dl) +- **Downloader**: downloads MP3 [directly from the interface[(https://user-images.githubusercontent.com/61631665/129977677-83a7d067-c192-45e1-98ae-b5a4927393be.png)] [(youtube-dl)](https://github.com/ytdl-org/youtube-dl) - **No Google Login**: remove Google login buttons and links from the interface - **Shortcuts**: use your usual shortcuts (media keys, Ctrl/CMD + F…) to control YouTube Music - **Navigation**: next/back navigation arrows directly integrated in the interface, like in your favorite browser -- **Auto confirm when paused**: when the "Continue Watching?" modal appears, automatically click "Yes" +- **Auto confirm when paused**: when the ["Continue Watching?"](https://user-images.githubusercontent.com/61631665/129977894-01c60740-7ec6-4bf0-9a2c-25da24491b0e.png) modal appears, automatically click "Yes" - **Hide video player**: no video in the interface when playing music -- **Notifications**: display a notification when a song starts playing +- **Notifications**: display a [notification](https://user-images.githubusercontent.com/78568641/114102651-63ce0e00-98d0-11eb-9dfe-c5a02bb54f9c.png) when a song starts playing - **Touchbar**: custom TouchBar layout for macOS - [**Discord**](https://discord.com/): show your friends what you listen to with [Rich Presence](https://user-images.githubusercontent.com/28219076/104362104-a7a0b980-5513-11eb-9744-bb89eabe0016.png) -- **In-app menu**: control app from your tray +- **In-app menu**: allows you to [control app from your tray](https://user-images.githubusercontent.com/61631665/129975597-65491d42-47bd-426a-a1a0-7c91114255ff.png) and [gives bars a fancy, dark look](https://user-images.githubusercontent.com/78568641/112215894-923dbf00-8c29-11eb-95c3-3ce15db27eca.png) - [**Last.fm**](https://www.last.fm/): scrobbles support -- **Playback speed**: listen fast, listen slow! -- **Precise volume**: more control over the volume for more comfort +- **Playback speed**: listen fast, listen slow! [Adds a slider that controls song speed](https://user-images.githubusercontent.com/61631665/129976003-e55db5ba-bf42-448c-a059-26a009775e68.png) +- **Precise volume**: customizable volume steps for more comfort, allows controlling the volume in precisely using mousewheel - [**SponsorBlock**](https://github.com/ajayyy/SponsorBlock): skips non-music parts - **Taskbar media control**: control app from your [Windows taskbar](https://user-images.githubusercontent.com/78568641/111916130-24a35e80-8a82-11eb-80c8-5021c1aa27f4.png) From aff0415816308902ca91135ba253a5291a49c58d Mon Sep 17 00:00:00 2001 From: konhi#1588 Date: Thu, 19 Aug 2021 00:15:25 +0200 Subject: [PATCH 08/36] Fix broken link Oops. --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 39d5889c..0eb8d560 100644 --- a/readme.md +++ b/readme.md @@ -36,7 +36,7 @@ Install the `youtube-music-bin` package from the AUR. For AUR installation instr ## Available plugins: - **Ad Blocker**: block all ads and tracking out of the box -- **Downloader**: downloads MP3 [directly from the interface[(https://user-images.githubusercontent.com/61631665/129977677-83a7d067-c192-45e1-98ae-b5a4927393be.png)] [(youtube-dl)](https://github.com/ytdl-org/youtube-dl) +- **Downloader**: downloads MP3 [directly from the interface](https://user-images.githubusercontent.com/61631665/129977677-83a7d067-c192-45e1-98ae-b5a4927393be.png) [(youtube-dl)](https://github.com/ytdl-org/youtube-dl) - **No Google Login**: remove Google login buttons and links from the interface - **Shortcuts**: use your usual shortcuts (media keys, Ctrl/CMD + F…) to control YouTube Music - **Navigation**: next/back navigation arrows directly integrated in the interface, like in your favorite browser From 086048780a1b6fa0c2928bba1ce8fcb998bb7816 Mon Sep 17 00:00:00 2001 From: konhi#1588 Date: Thu, 19 Aug 2021 15:04:47 +0200 Subject: [PATCH 09/36] suggestions from @Araxeus and @cpiber --- readme.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/readme.md b/readme.md index 0eb8d560..a0338f5b 100644 --- a/readme.md +++ b/readme.md @@ -34,23 +34,23 @@ You can check out the [latest release](https://github.com/th-ch/youtube-music/re Install the `youtube-music-bin` package from the AUR. For AUR installation instructions, take a look at this [wiki page](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages). ## Available plugins: - - **Ad Blocker**: block all ads and tracking out of the box -- **Downloader**: downloads MP3 [directly from the interface](https://user-images.githubusercontent.com/61631665/129977677-83a7d067-c192-45e1-98ae-b5a4927393be.png) [(youtube-dl)](https://github.com/ytdl-org/youtube-dl) -- **No Google Login**: remove Google login buttons and links from the interface -- **Shortcuts**: use your usual shortcuts (media keys, Ctrl/CMD + F…) to control YouTube Music -- **Navigation**: next/back navigation arrows directly integrated in the interface, like in your favorite browser - **Auto confirm when paused**: when the ["Continue Watching?"](https://user-images.githubusercontent.com/61631665/129977894-01c60740-7ec6-4bf0-9a2c-25da24491b0e.png) modal appears, automatically click "Yes" +- **Disable autoplay**: makes every song start in "paused" mode +- **Downloader**: downloads MP3 [directly from the interface](https://user-images.githubusercontent.com/61631665/129977677-83a7d067-c192-45e1-98ae-b5a4927393be.png) [(youtube-dl)](https://github.com/ytdl-org/youtube-dl) - **Hide video player**: no video in the interface when playing music +- **In-app menu**: [gives bars a fancy, dark look](https://user-images.githubusercontent.com/78568641/112215894-923dbf00-8c29-11eb-95c3-3ce15db27eca.png) +- **Navigation**: next/back navigation arrows directly integrated in the interface, like in your favorite browser +- **No Google Login**: remove Google login buttons and links from the interface - **Notifications**: display a [notification](https://user-images.githubusercontent.com/78568641/114102651-63ce0e00-98d0-11eb-9dfe-c5a02bb54f9c.png) when a song starts playing +- **Playback speed**: listen fast, listen slow! [Adds a slider that controls song speed](https://user-images.githubusercontent.com/61631665/129976003-e55db5ba-bf42-448c-a059-26a009775e68.png) +- **Precise volume**: customizable volume steps for more comfort, allows controlling the volume precisely using mousewheel +- **Shortcuts**: use your usual shortcuts (media keys, Ctrl/CMD + F…) to control YouTube Music, you may setup custom global hotkeys for play/pause/next/previous song +- **Taskbar media control**: control app from your [Windows taskbar](https://user-images.githubusercontent.com/78568641/111916130-24a35e80-8a82-11eb-80c8-5021c1aa27f4.png) - **Touchbar**: custom TouchBar layout for macOS - [**Discord**](https://discord.com/): show your friends what you listen to with [Rich Presence](https://user-images.githubusercontent.com/28219076/104362104-a7a0b980-5513-11eb-9744-bb89eabe0016.png) -- **In-app menu**: allows you to [control app from your tray](https://user-images.githubusercontent.com/61631665/129975597-65491d42-47bd-426a-a1a0-7c91114255ff.png) and [gives bars a fancy, dark look](https://user-images.githubusercontent.com/78568641/112215894-923dbf00-8c29-11eb-95c3-3ce15db27eca.png) - [**Last.fm**](https://www.last.fm/): scrobbles support -- **Playback speed**: listen fast, listen slow! [Adds a slider that controls song speed](https://user-images.githubusercontent.com/61631665/129976003-e55db5ba-bf42-448c-a059-26a009775e68.png) -- **Precise volume**: customizable volume steps for more comfort, allows controlling the volume in precisely using mousewheel - [**SponsorBlock**](https://github.com/ajayyy/SponsorBlock): skips non-music parts -- **Taskbar media control**: control app from your [Windows taskbar](https://user-images.githubusercontent.com/78568641/111916130-24a35e80-8a82-11eb-80c8-5021c1aa27f4.png) ## Dev From 878ec1f6c1775458927ce3c5b9e71a30e45d702f Mon Sep 17 00:00:00 2001 From: konhi#1588 Date: Thu, 19 Aug 2021 15:09:31 +0200 Subject: [PATCH 10/36] sort alphabetically --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index a0338f5b..c47170c1 100644 --- a/readme.md +++ b/readme.md @@ -37,20 +37,20 @@ Install the `youtube-music-bin` package from the AUR. For AUR installation instr - **Ad Blocker**: block all ads and tracking out of the box - **Auto confirm when paused**: when the ["Continue Watching?"](https://user-images.githubusercontent.com/61631665/129977894-01c60740-7ec6-4bf0-9a2c-25da24491b0e.png) modal appears, automatically click "Yes" - **Disable autoplay**: makes every song start in "paused" mode +- [**Discord**](https://discord.com/): show your friends what you listen to with [Rich Presence](https://user-images.githubusercontent.com/28219076/104362104-a7a0b980-5513-11eb-9744-bb89eabe0016.png) - **Downloader**: downloads MP3 [directly from the interface](https://user-images.githubusercontent.com/61631665/129977677-83a7d067-c192-45e1-98ae-b5a4927393be.png) [(youtube-dl)](https://github.com/ytdl-org/youtube-dl) - **Hide video player**: no video in the interface when playing music - **In-app menu**: [gives bars a fancy, dark look](https://user-images.githubusercontent.com/78568641/112215894-923dbf00-8c29-11eb-95c3-3ce15db27eca.png) +- [**Last.fm**](https://www.last.fm/): scrobbles support - **Navigation**: next/back navigation arrows directly integrated in the interface, like in your favorite browser - **No Google Login**: remove Google login buttons and links from the interface - **Notifications**: display a [notification](https://user-images.githubusercontent.com/78568641/114102651-63ce0e00-98d0-11eb-9dfe-c5a02bb54f9c.png) when a song starts playing - **Playback speed**: listen fast, listen slow! [Adds a slider that controls song speed](https://user-images.githubusercontent.com/61631665/129976003-e55db5ba-bf42-448c-a059-26a009775e68.png) - **Precise volume**: customizable volume steps for more comfort, allows controlling the volume precisely using mousewheel - **Shortcuts**: use your usual shortcuts (media keys, Ctrl/CMD + F…) to control YouTube Music, you may setup custom global hotkeys for play/pause/next/previous song +- [**SponsorBlock**](https://github.com/ajayyy/SponsorBlock): skips non-music parts - **Taskbar media control**: control app from your [Windows taskbar](https://user-images.githubusercontent.com/78568641/111916130-24a35e80-8a82-11eb-80c8-5021c1aa27f4.png) - **Touchbar**: custom TouchBar layout for macOS -- [**Discord**](https://discord.com/): show your friends what you listen to with [Rich Presence](https://user-images.githubusercontent.com/28219076/104362104-a7a0b980-5513-11eb-9744-bb89eabe0016.png) -- [**Last.fm**](https://www.last.fm/): scrobbles support -- [**SponsorBlock**](https://github.com/ajayyy/SponsorBlock): skips non-music parts ## Dev From 7fa1278b31ec44bdaf8f4d9c7fd3e7ca8f3d738f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Szyma=C5=84ski?= Date: Thu, 19 Aug 2021 16:16:49 +0200 Subject: [PATCH 11/36] Add "Listen Along" button --- plugins/discord/back.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/discord/back.js b/plugins/discord/back.js index c6faadd7..a2eef1f5 100644 --- a/plugins/discord/back.js +++ b/plugins/discord/back.js @@ -29,6 +29,9 @@ module.exports = (win, {activityTimoutEnabled, activityTimoutTime}) => { songInfo.uploadDate, songInfo.views.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " views" ].join(' || '), + buttons: [ + { label: "Listen Along", url: songInfo.url }, + ] }; if (songInfo.isPaused) { From f98318e737a01f2dac764730bc34b4a88639d349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Szyma=C5=84ski?= Date: Thu, 19 Aug 2021 16:49:34 +0200 Subject: [PATCH 12/36] Add platform-based user-agent --- index.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index dfb6d288..f2a78627 100644 --- a/index.js +++ b/index.js @@ -207,8 +207,23 @@ app.once("browser-window-created", (event, win) => { // Force user-agent "Firefox Windows" for Google OAuth to work // From https://github.com/firebase/firebase-js-sdk/issues/2478#issuecomment-571356751 // Only set on accounts.google.com, otherwise querySelectors in preload scripts fail (?) - const userAgent = - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0"; + // Uses custom user agent to Google alert with a correct device type (https://github.com/th-ch/youtube-music/issues/327) + // User agents are from https://developers.whatismybrowser.com/useragents/explore/ + const userAgents = { + mac: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0", + windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + linux: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36", + } + + const userAgent = "" + + if (process.platform == darwin) { + userAgent = userAgents.mac; + } else if (process.platform == win32) { + userAgent = userAgents.windows; + } else { + userAgent = userAgents.linux; + } win.webContents.session.webRequest.onBeforeSendHeaders((details, cb) => { details.requestHeaders["User-Agent"] = userAgent; From 4b1dfa1173717e16861f9343d18ae4b9b79a0a52 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 19 Aug 2021 21:20:28 +0000 Subject: [PATCH 13/36] fix: upgrade @cliqz/adblocker-electron from 1.22.2 to 1.22.3 Snyk has created this PR to upgrade @cliqz/adblocker-electron from 1.22.2 to 1.22.3. See this package in npm: See this project in Snyk: https://app.snyk.io/org/th-ch/project/81809c53-bb7b-46b9-a0d7-806d45d74ac6?utm_source=github&utm_medium=upgrade-pr --- package.json | 2 +- yarn.lock | 62 ++++++++++++++++++++++++++-------------------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index a2db61fa..65487895 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "npm": "Please use yarn and not npm" }, "dependencies": { - "@cliqz/adblocker-electron": "^1.22.1", + "@cliqz/adblocker-electron": "^1.22.3", "@ffmpeg/core": "^0.10.0", "@ffmpeg/ffmpeg": "^0.10.0", "YoutubeNonStop": "git://github.com/lawfx/YoutubeNonStop.git#v0.9.0", diff --git a/yarn.lock b/yarn.lock index 187191be..8abc1dda 100644 --- a/yarn.lock +++ b/yarn.lock @@ -439,45 +439,45 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@cliqz/adblocker-content@^1.22.2": - version "1.22.2" - resolved "https://registry.yarnpkg.com/@cliqz/adblocker-content/-/adblocker-content-1.22.2.tgz#643849d5f08c167eb84a2e7e3f1f9fbc41a3889b" - integrity sha512-EsV00IdW8sGujGnylOGR8dm401FdIfPRAjuevsRlZjgDE+hQKj6n5wwrZaylPIh994hWesg6bxWTmXpJ2Sy2QQ== +"@cliqz/adblocker-content@^1.22.4": + version "1.22.4" + resolved "https://registry.yarnpkg.com/@cliqz/adblocker-content/-/adblocker-content-1.22.4.tgz#442f4d9cf5d5854d9783553f7baa5162c95c66ed" + integrity sha512-ddWU1Qg2cRA8vj15EcMDNeIYzUN5LpFjAR7bLvuxsp+0jiNNuz3ZxaXmYunXYpZbTsumMEBz1LWzkLX1kk+eow== dependencies: - "@cliqz/adblocker-extended-selectors" "^1.22.2" + "@cliqz/adblocker-extended-selectors" "^1.22.4" -"@cliqz/adblocker-electron-preload@^1.22.2": - version "1.22.2" - resolved "https://registry.yarnpkg.com/@cliqz/adblocker-electron-preload/-/adblocker-electron-preload-1.22.2.tgz#eea674767a60abe4e5f9ccb46188d33656f551d0" - integrity sha512-4JSqNNYo4hXMoZjnyBVTd3z2yV2n5qeoNPk+WaeOFEF9uJXhqPR+Sz7scNB6nMYnRuSQfraeogtdaA4s0JkJWQ== +"@cliqz/adblocker-electron-preload@^1.22.4": + version "1.22.4" + resolved "https://registry.yarnpkg.com/@cliqz/adblocker-electron-preload/-/adblocker-electron-preload-1.22.4.tgz#f3507e6f0e3898d4b9fa4f0e4ad6a37f57309f35" + integrity sha512-wUuqlfV0kYjqz6HUjZXzWz2NFXTA+e7T61xEt8pUbbgfgA9Bsn66Adb6rFsnRaMKLlgyyab7MWp9uEWMQac2ig== dependencies: - "@cliqz/adblocker-content" "^1.22.2" + "@cliqz/adblocker-content" "^1.22.4" -"@cliqz/adblocker-electron@^1.22.1": - version "1.22.2" - resolved "https://registry.yarnpkg.com/@cliqz/adblocker-electron/-/adblocker-electron-1.22.2.tgz#85af3b49f7f653e6fb0d008b6523e3b3ba0dd41e" - integrity sha512-uSQjbcv9/csjQOO0AgqK8AnqdpKseebPkwXozglU1uFVVnuSOTs/4RohL3yac9uMkJtfyAIhT3mnbw9Cf4o+gQ== +"@cliqz/adblocker-electron@^1.22.3": + version "1.22.4" + resolved "https://registry.yarnpkg.com/@cliqz/adblocker-electron/-/adblocker-electron-1.22.4.tgz#eb62395595179b45fe25027ead52ac51e3e80e4f" + integrity sha512-wyI/9UxUdc3fZC4vWgmdNBLm0jKH+DYClNvTAQ6fLRIyhiD5efOsFdpiwr+OWPhgNpKDs9c9dQyApy3SVNdw+Q== dependencies: - "@cliqz/adblocker" "^1.22.2" - "@cliqz/adblocker-electron-preload" "^1.22.2" + "@cliqz/adblocker" "^1.22.4" + "@cliqz/adblocker-electron-preload" "^1.22.4" tldts-experimental "^5.6.21" -"@cliqz/adblocker-extended-selectors@^1.22.2": - version "1.22.2" - resolved "https://registry.yarnpkg.com/@cliqz/adblocker-extended-selectors/-/adblocker-extended-selectors-1.22.2.tgz#1cad3c1569b765d9e7f8672c85b2a7b1e8e9ee90" - integrity sha512-/u4SmQ1wr7d80iGP705fZrfHjJUTf/1MyRXz5Wltt7i3OHvOCQEoST2mqNlfx0W/9gIWzxA7cFRLY0/aITmzTw== +"@cliqz/adblocker-extended-selectors@^1.22.4": + version "1.22.4" + resolved "https://registry.yarnpkg.com/@cliqz/adblocker-extended-selectors/-/adblocker-extended-selectors-1.22.4.tgz#4069136353a95cb2291d7db9951ea4e85c303e2c" + integrity sha512-Puae9uK3gIXUGNY7Nj8TtZZXw/QYOih+tKS3YnQwtLgtFR2TkoKzYyHCu1OPu49NLRbuieiHAkaAG6AHflVtPg== -"@cliqz/adblocker@^1.22.2": - version "1.22.2" - resolved "https://registry.yarnpkg.com/@cliqz/adblocker/-/adblocker-1.22.2.tgz#99a14d56327734d3083a077d96fe7b91c236bf7a" - integrity sha512-P+a8gYbRbQy38mYsr7932h2cnK/7AEuQrmCEfLTO1+abCr2v5RM2Qb+cCn/JVnQSeqnysebAIXoV+PUzrjfpiQ== +"@cliqz/adblocker@^1.22.4": + version "1.22.4" + resolved "https://registry.yarnpkg.com/@cliqz/adblocker/-/adblocker-1.22.4.tgz#835be918f4c08b849b68efda5e01787f1041ad4a" + integrity sha512-SDgSiKLkWTqX57MUH2DYBVJjh2/EiclUDvXi2oLRLFT9KXXXYNUctSqh5gOchPoWPKreLIeEleLsdTvHKkagaA== dependencies: - "@cliqz/adblocker-content" "^1.22.2" - "@cliqz/adblocker-extended-selectors" "^1.22.2" + "@cliqz/adblocker-content" "^1.22.4" + "@cliqz/adblocker-extended-selectors" "^1.22.4" "@remusao/guess-url-type" "^1.1.2" "@remusao/small" "^1.1.2" "@remusao/smaz" "^1.7.1" - "@types/chrome" "^0.0.145" + "@types/chrome" "^0.0.153" "@types/firefox-webext-browser" "^82.0.0" tldts-experimental "^5.6.21" @@ -1203,10 +1203,10 @@ "@types/node" "*" "@types/responselike" "*" -"@types/chrome@^0.0.145": - version "0.0.145" - resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.145.tgz#6c53ae0af5f25350b07bfd24cf459b5fe65cd9b8" - integrity sha512-vLvTMmfc8mvwOZzkmn2UwlWSNu0t0txBkyuIv8NgihRkvFCe6XJX65YZAgAP/RdBit3enhU2GTxCr+prn4uZmA== +"@types/chrome@^0.0.153": + version "0.0.153" + resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.153.tgz#6c3009eb7be1d0fbace82be159122fd99e4a6465" + integrity sha512-J8VrwjuJLh6BPmUTmZQd41zJJjVpRnnMZ/E9uHfQZ3RRAESVqYxin8YeCdZUak7+5dUI6wr8Sr6UfR3dehLIdQ== dependencies: "@types/filesystem" "*" "@types/har-format" "*" From 9df5d921c719f4e0feeced97b18fa6f6e2a6941a Mon Sep 17 00:00:00 2001 From: konhi Date: Fri, 20 Aug 2021 12:33:46 +0200 Subject: [PATCH 14/36] Chrome -> Firefox, simplified using electron-is suggestions by @Araxeus --- index.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index f2a78627..c54d2555 100644 --- a/index.js +++ b/index.js @@ -211,19 +211,14 @@ app.once("browser-window-created", (event, win) => { // User agents are from https://developers.whatismybrowser.com/useragents/explore/ const userAgents = { mac: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0", - windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", - linux: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36", - } - - const userAgent = "" - - if (process.platform == darwin) { - userAgent = userAgents.mac; - } else if (process.platform == win32) { - userAgent = userAgents.windows; - } else { - userAgent = userAgents.linux; + windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0", + linux: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0", } + + const userAgent = + is.macOS() ? userAgents.mac : + is.windows() ? userAgents.windows : + userAgents.linux; win.webContents.session.webRequest.onBeforeSendHeaders((details, cb) => { details.requestHeaders["User-Agent"] = userAgent; From 6bc1d1606f95c7d91b5bf41d33fd19e6042c1293 Mon Sep 17 00:00:00 2001 From: TC Date: Mon, 23 Aug 2021 01:05:45 +0200 Subject: [PATCH 15/36] Bump node to v14 --- .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 67feb14a..ccd5e1ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@v1 with: - node-version: "12.x" + node-version: "14.x" - name: Get yarn cache directory path id: yarn-cache-dir-path diff --git a/package.json b/package.json index a2db61fa..4be16161 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "release:win": "yarn run clean && electron-builder --win -p always" }, "engines": { - "node": ">=12.20", + "node": ">=14.0.0", "npm": "Please use yarn and not npm" }, "dependencies": { From c66ff2bf0564722b7054db101ca80099318ee07a Mon Sep 17 00:00:00 2001 From: TC Date: Mon, 23 Aug 2021 00:49:00 +0200 Subject: [PATCH 16/36] Apply clean up util to title + enrich prefixes --- plugins/downloader/youtube-dl.js | 7 +++++-- providers/song-info.js | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/plugins/downloader/youtube-dl.js b/plugins/downloader/youtube-dl.js index f0f47cec..906fc35c 100644 --- a/plugins/downloader/youtube-dl.js +++ b/plugins/downloader/youtube-dl.js @@ -15,7 +15,7 @@ const ytdl = require("ytdl-core"); const { triggerAction, triggerActionSync } = require("../utils"); const { ACTIONS, CHANNEL } = require("./actions.js"); const { getFolder, urlToJPG } = require("./utils"); -const { cleanupArtistName } = require("../../providers/song-info"); +const { cleanupName } = require("../../providers/song-info"); const { createFFmpeg } = FFmpeg; const ffmpeg = createFFmpeg({ @@ -40,7 +40,10 @@ const downloadVideoToMP3 = async ( const { videoDetails } = await ytdl.getInfo(videoUrl); const thumbnails = videoDetails?.thumbnails; metadata = { - artist: videoDetails?.media?.artist || cleanupArtistName(videoDetails?.author?.name) || "", + artist: + videoDetails?.media?.artist || + cleanupName(videoDetails?.author?.name) || + "", title: videoDetails?.media?.song || videoDetails?.title || "", imageSrcYTPL: thumbnails ? urlToJPG(thumbnails[thumbnails.length - 1].url, videoDetails?.videoId) diff --git a/providers/song-info.js b/providers/song-info.js index 08eaf944..0ef0f868 100644 --- a/providers/song-info.js +++ b/providers/song-info.js @@ -55,8 +55,9 @@ const songInfo = { const handleData = async (responseText, win) => { let data = JSON.parse(responseText); - songInfo.title = data?.videoDetails?.title; - songInfo.artist = await getArtist(win) || cleanupArtistName(data?.videoDetails?.author); + songInfo.title = cleanupName(data?.videoDetails?.title); + songInfo.artist = + (await getArtist(win)) || cleanupName(data?.videoDetails?.author); songInfo.views = data?.videoDetails?.viewCount; songInfo.imageSrc = data?.videoDetails?.thumbnail?.thumbnails?.pop()?.url; songInfo.songDuration = data?.videoDetails?.lengthSeconds; @@ -98,8 +99,15 @@ const registerProvider = (win) => { }); }; -const suffixesToRemove = [' - Topic', 'VEVO']; -function cleanupArtistName(artist) { +const suffixesToRemove = [ + " - Topic", + "VEVO", + " (Performance Video)", + " (Official Music Video)", + " (Official Video)", + " (Clip officiel)", +]; +function cleanupName(artist) { if (!artist) { return artist; } @@ -114,4 +122,4 @@ function cleanupArtistName(artist) { module.exports = registerCallback; module.exports.setupSongInfo = registerProvider; module.exports.getImage = getImage; -module.exports.cleanupArtistName = cleanupArtistName; +module.exports.cleanupName = cleanupName; From acbe0ac25d568c25fedb514e0e96c66497b0f2d6 Mon Sep 17 00:00:00 2001 From: TC Date: Mon, 23 Aug 2021 00:50:49 +0200 Subject: [PATCH 17/36] Add Genius lyrics plugin --- plugins/lyrics-genius/back.js | 52 ++++++++++++++++++++++++++ plugins/lyrics-genius/front.js | 65 +++++++++++++++++++++++++++++++++ plugins/lyrics-genius/style.css | 7 ++++ 3 files changed, 124 insertions(+) create mode 100644 plugins/lyrics-genius/back.js create mode 100644 plugins/lyrics-genius/front.js create mode 100644 plugins/lyrics-genius/style.css diff --git a/plugins/lyrics-genius/back.js b/plugins/lyrics-genius/back.js new file mode 100644 index 00000000..302425d3 --- /dev/null +++ b/plugins/lyrics-genius/back.js @@ -0,0 +1,52 @@ +const { join } = require("path"); + +const { ipcMain } = require("electron"); +const is = require("electron-is"); +const fetch = require("node-fetch"); + +const { cleanupName } = require("../../providers/song-info"); +const { injectCSS } = require("../utils"); + +module.exports = async (win) => { + injectCSS(win.webContents, join(__dirname, "style.css")); + + ipcMain.on("search-genius-lyrics", async (event, extractedSongInfo) => { + const metadata = JSON.parse(extractedSongInfo); + const queryString = `${cleanupName(metadata.artist)} ${cleanupName( + metadata.title + )}`; + + let response = await fetch( + `https://genius.com/api/search/multi?per_page=5&q=${encodeURI( + queryString + )}` + ); + if (!response.ok) { + event.returnValue = null; + return; + } + + const info = await response.json(); + let url = ""; + try { + url = info.response.sections.filter( + (section) => section.type === "song" + )[0].hits[0].result.url; + } catch { + event.returnValue = null; + return; + } + + if (is.dev()) { + console.log("Fetching lyrics from Genius:", url); + } + + response = await fetch(url); + if (!response.ok) { + event.returnValue = null; + return; + } + + event.returnValue = await response.text(); + }); +}; diff --git a/plugins/lyrics-genius/front.js b/plugins/lyrics-genius/front.js new file mode 100644 index 00000000..e1354d26 --- /dev/null +++ b/plugins/lyrics-genius/front.js @@ -0,0 +1,65 @@ +const { ipcRenderer } = require("electron"); + +module.exports = () => { + ipcRenderer.on("update-song-info", (_, extractedSongInfo) => { + const lyricsTab = document.querySelector('tp-yt-paper-tab[tabindex="-1"]'); + + // Check if disabled + if (!lyricsTab || !lyricsTab.hasAttribute("disabled")) { + return; + } + + const html = ipcRenderer.sendSync( + "search-genius-lyrics", + extractedSongInfo + ); + if (!html) { + return; + } + + const wrapper = document.createElement("div"); + wrapper.innerHTML = html; + const lyricsSelector1 = wrapper.querySelector(".lyrics"); + const lyricsSelector2 = wrapper.querySelector( + '[class^="Lyrics__Container"]' + ); + const lyrics = lyricsSelector1 + ? lyricsSelector1.innerHTML + : lyricsSelector2 + ? lyricsSelector2.innerHTML + : null; + if (!lyrics) { + return; + } + + lyricsTab.removeAttribute("disabled"); + lyricsTab.removeAttribute("aria-disabled"); + document.querySelector("tp-yt-paper-tab").onclick = () => { + lyricsTab.removeAttribute("disabled"); + lyricsTab.removeAttribute("aria-disabled"); + }; + + lyricsTab.onclick = () => { + const tabContainer = document.querySelector("ytmusic-tab-renderer"); + console.log("tabContainer", tabContainer); + const observer = new MutationObserver((_, observer) => { + const lyricsContainer = document.querySelector( + '[page-type="MUSIC_PAGE_TYPE_TRACK_LYRICS"] > ytmusic-message-renderer' + ); + if (lyricsContainer) { + lyricsContainer.innerHTML = `
+ ${lyrics} + + Source : Genius +
`; + observer.disconnect(); + } + }); + observer.observe(tabContainer, { + attributes: true, + childList: true, + subtree: true, + }); + }; + }); +}; diff --git a/plugins/lyrics-genius/style.css b/plugins/lyrics-genius/style.css new file mode 100644 index 00000000..7807a814 --- /dev/null +++ b/plugins/lyrics-genius/style.css @@ -0,0 +1,7 @@ +/* Disable links in Genius lyrics */ +.genius-lyrics a { + color: var(--ytmusic-text-primary); + display: inline-block; + pointer-events: none; + text-decoration: none; +} From f27ff526894f9bbebce02ad47dc2c089b3c64f59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Aug 2021 23:16:24 +0000 Subject: [PATCH 18/36] Bump jszip from 3.5.0 to 3.7.1 Bumps [jszip](https://github.com/Stuk/jszip) from 3.5.0 to 3.7.1. - [Release notes](https://github.com/Stuk/jszip/releases) - [Changelog](https://github.com/Stuk/jszip/blob/master/CHANGES.md) - [Commits](https://github.com/Stuk/jszip/compare/v3.5.0...v3.7.1) --- updated-dependencies: - dependency-name: jszip dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 187191be..c659590c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5990,9 +5990,9 @@ jsprim@^1.2.2: verror "1.10.0" jszip@^3.1.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.5.0.tgz#b4fd1f368245346658e781fec9675802489e15f6" - integrity sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA== + version "3.7.1" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.1.tgz#bd63401221c15625a1228c556ca8a68da6fda3d9" + integrity sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg== dependencies: lie "~3.3.0" pako "~1.0.2" From e888b5c896ad4bd9e79f14c8b74d65df912ab815 Mon Sep 17 00:00:00 2001 From: TC Date: Mon, 23 Aug 2021 01:17:29 +0200 Subject: [PATCH 19/36] Update menu buttons to new format --- plugins/downloader/style.css | 8 ++ plugins/downloader/templates/download.html | 58 ++++---- plugins/playback-speed/templates/slider.html | 138 ++++++++++--------- 3 files changed, 114 insertions(+), 90 deletions(-) diff --git a/plugins/downloader/style.css b/plugins/downloader/style.css index 8119fc5e..6f29fc6b 100644 --- a/plugins/downloader/style.css +++ b/plugins/downloader/style.css @@ -6,8 +6,16 @@ cursor: pointer; } +.menu-item > .yt-simple-endpoint:hover { + background-color: var(--ytmusic-menu-item-hover-background-color); +} + .menu-icon { flex: var(--ytmusic-menu-item-icon_-_flex); margin: var(--ytmusic-menu-item-icon_-_margin); fill: var(--ytmusic-menu-item-icon_-_fill); + stroke: var(--iron-icon-stroke-color, none); + width: var(--iron-icon-width, 24px); + height: var(--iron-icon-height, 24px); + animation: var(--iron-icon_-_animation); } diff --git a/plugins/downloader/templates/download.html b/plugins/downloader/templates/download.html index d4f455d0..ede5ec02 100644 --- a/plugins/downloader/templates/download.html +++ b/plugins/downloader/templates/download.html @@ -1,5 +1,5 @@ diff --git a/plugins/playback-speed/templates/slider.html b/plugins/playback-speed/templates/slider.html index 67ced7a4..85865af0 100644 --- a/plugins/playback-speed/templates/slider.html +++ b/plugins/playback-speed/templates/slider.html @@ -1,79 +1,87 @@