From d5cb310799005d19463da5f52770cfad08fdd0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Hamy?= Date: Mon, 26 May 2025 15:55:32 +0200 Subject: [PATCH 1/8] Add patch to optionally hide the "Application is offline" banner --- patches/11-hide-appoffline-banner.patch | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 patches/11-hide-appoffline-banner.patch diff --git a/patches/11-hide-appoffline-banner.patch b/patches/11-hide-appoffline-banner.patch new file mode 100644 index 0000000..ed6fb64 --- /dev/null +++ b/patches/11-hide-appoffline-banner.patch @@ -0,0 +1,62 @@ +From eada05985500a3fb4c8dc0a9fa12a2300f785206 Mon Sep 17 00:00:00 2001 +From: Aurélien Hamy +Date: Mon, 26 May 2025 15:50:35 +0200 +Subject: [PATCH] feat: add toggle to hide application offline banner + +This solves #123 by adding the `--hide-appoffline-banner` command-line argument +to hide the annoying "Application is offline" banner, that sometimes appears when +using a VPN or DNS level blocker. +--- + build/index.html | 5 +++++ + build/main.js | 1 + + build/preload.js | 6 ++++++ + 3 files changed, 12 insertions(+) + +diff --git a/build/index.html b/build/index.html +index 4efcd23..019e786 100644 +--- a/build/index.html ++++ b/build/index.html +@@ -86,6 +86,11 @@ + width: auto !important; + } + } ++ ++ /* hide the offline alert when needed */ ++ .hide-AppOffline-banner .alert-wrapper:has(> div[data-testid="alert-AppOffline"]) { ++ display: none !important; ++ } + + + +diff --git a/build/main.js b/build/main.js +index 99935cb..91c99fb 100644 +--- a/build/main.js ++++ b/build/main.js +@@ -3166,6 +3166,7 @@ + getRealPath(external_electron_namespaceObject.app, __dirname), + "preload.js" + ), ++ additionalArguments: [`--hide-appoffline-banner=${process.argv.some((arg) => arg === "--hide-appoffline-banner")}`], + }, + windowOptions = { + title: "Deezer Desktop", +diff --git a/build/preload.js b/build/preload.js +index 1301e93..6814466 100644 +--- a/build/preload.js ++++ b/build/preload.js +@@ -538,6 +538,12 @@ + external_i18next_default().dir(external_i18next_default().language) + ? "rtl" + : "ltr"); ++ if (process.argv.some((arg) => arg === "--hide-appoffline-banner=true")) ++ document ++ .getElementsByTagName("body")[0] ++ .classList.add( ++ "hide-AppOffline-banner" ++ ); + }); + })(), + (module.exports = __webpack_exports__); +-- +2.49.0 + From f9bb47748930e5350c6af7489ac970699257bcb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Hamy?= Date: Mon, 26 May 2025 15:58:22 +0200 Subject: [PATCH 2/8] Update makefile accordingly --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 3c92291..5ece2f8 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,7 @@ prepare: clean install_build_deps @echo "08 - Provide additional metadata (https://github.com/aunetx/deezer-linux/pull/95)" @echo "09 - Add Discord Rich Presence (https://github.com/aunetx/deezer-linux/pull/82)" @echo "10 - Improve responsiveness on small devices (https://github.com/aunetx/deezer-linux/pull/122)" + @echo "11 - Hide Application is offline banner (https://github.com/aunetx/deezer-linux/pull/124)" @$(foreach p, $(wildcard ./patches/*), patch -p 1 -d $(APP_DIR) < $(p);) @echo "Append `package-append.json` to the `package.json` of the app" From 947b699d2579fa71a19e687e9129b7aa0031dd96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Hamy?= Date: Mon, 26 May 2025 16:06:55 +0200 Subject: [PATCH 3/8] Update README to document `--hide-appoffline-banner` --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a4cd8cb..fd2f1cd 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Other packages can be installed from you package manager, either by clicking on | `--keep-kernel` | Use the exact kernel version (see [patch](./patches/05-remove-os-information.patch))
_This feature impacts privacy._ | | `--disable-features` | Disable some features (see [patch](./patches/06-better-management-of-MPRIS.patch)) | | `--enable-discord-rpc` | Enable Discord RPC integration (see [patch](./patches/09-discord-rich-presence.patch)) | +| `--hide-appoffline-banner` | Hide the "Application is offline" banner that appears when using a VPN or DNS blocker (see [patch](./patches/11-hide-appoffline-banner.patch)) | `--enable-wayland-ime` `--ozone-platform-hint=auto` `--wayland-text-input-version=3` | Enable IME keyboard support on Wayland | | Environment variable | Options | Description | From bc8546bdcfe1f7482c2c9169371835d2260edeca Mon Sep 17 00:00:00 2001 From: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 01:43:20 +0000 Subject: [PATCH 4/8] deezer: Update DeezerDesktopSetup_7.0.80.exe --- dev.aunetx.deezer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev.aunetx.deezer.json b/dev.aunetx.deezer.json index 19e00ab..354f443 100644 --- a/dev.aunetx.deezer.json +++ b/dev.aunetx.deezer.json @@ -6,8 +6,8 @@ "sources": [ { "type": "archive", - "url": "https://cdn-content.dzcdn.net/builds/deezer-desktop/8cF2rAuKxLcU1oMDmCYm8Uiqe19Ql0HTySLssdzLkQ9ZWHuDTp2JBtQOvdrFzWPA/win32/x86/7.0.80/DeezerDesktopSetup_7.0.80.exe", - "sha256": "2a9a14883852bc033b7402ef7702a1f2fa922693cb767765312ccb3c21c399b8", + "url": "https://cdn-content.dzcdn.net/builds/deezer-desktop/8cF2rAuKxLcU1oMDmCYm8Uiqe19Ql0HTySLssdzLkQ9ZWHuDTp2JBtQOvdrFzWPA/win32/x86/7.0.100/DeezerDesktopSetup_7.0.100.exe", + "sha256": "d5ed39ce93110695d7a51f86c2589b6970c517bf61af06bd7f6a890dd5e20540", "only-arches": [ "x86_64" ], From 1e6e83ae1cedf54333ccd67009df860d5b8135c5 Mon Sep 17 00:00:00 2001 From: josselinonduty Date: Tue, 8 Jul 2025 12:36:57 +0200 Subject: [PATCH 5/8] chore: fix desktop entry file for flatpak builder --- dev.aunetx.deezer.desktop | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev.aunetx.deezer.desktop b/dev.aunetx.deezer.desktop index 0ea9bd5..061107f 100644 --- a/dev.aunetx.deezer.desktop +++ b/dev.aunetx.deezer.desktop @@ -11,4 +11,8 @@ Categories=Audio;Music;Player;AudioVideo; Keywords=Music;Player;Streaming;Online; StartupWMClass=Deezer SingleMainWindow=true -X-GNOME-UsesNotifications=true \ No newline at end of file +X-GNOME-UsesNotifications=true + +# Used by flatpak/flathub +Exec=run.sh %U +TryExec=run.sh \ No newline at end of file From 953841da377e22030ecfe380f4d0de41aaecd4ff Mon Sep 17 00:00:00 2001 From: josselinonduty Date: Tue, 8 Jul 2025 13:07:21 +0200 Subject: [PATCH 6/8] fix: improve hide appoffline patch w/ env var + docs --- README.md | 27 ++++++++-------- patches/11-hide-appoffline-banner.patch | 43 +++++++++++++------------ 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index fd2f1cd..247c0ce 100644 --- a/README.md +++ b/README.md @@ -37,20 +37,21 @@ Other packages can be installed from you package manager, either by clicking on ## Usage -| Option | Description | -| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- | -| `--start-in-tray` | Start the app in the tray (see [patch](./patches/01-start-hidden-in-tray.patch)) | -| `--disable-systray` | Quit the app when the window is closed (see [patch](./patches/03-quit.patch)) | -| `--keep-kernel` | Use the exact kernel version (see [patch](./patches/05-remove-os-information.patch))
_This feature impacts privacy._ | -| `--disable-features` | Disable some features (see [patch](./patches/06-better-management-of-MPRIS.patch)) | -| `--enable-discord-rpc` | Enable Discord RPC integration (see [patch](./patches/09-discord-rich-presence.patch)) | -| `--hide-appoffline-banner` | Hide the "Application is offline" banner that appears when using a VPN or DNS blocker (see [patch](./patches/11-hide-appoffline-banner.patch)) -| `--enable-wayland-ime` `--ozone-platform-hint=auto` `--wayland-text-input-version=3` | Enable IME keyboard support on Wayland | +| Option | Description | +| ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `--start-in-tray` | Start the app in the tray (see [patch](./patches/01-start-hidden-in-tray.patch)) | +| `--disable-systray` | Quit the app when the window is closed (see [patch](./patches/03-quit.patch)) | +| `--keep-kernel` | Use the exact kernel version (see [patch](./patches/05-remove-os-information.patch))
_This feature impacts privacy._ | +| `--disable-features` | Disable some features (see [patch](./patches/06-better-management-of-MPRIS.patch)) | +| `--enable-discord-rpc` | Enable Discord RPC integration (see [patch](./patches/09-discord-rich-presence.patch)) | +| `--hide-appoffline-banner` | Hide the "Application is offline" banner that appears when using a VPN or DNS blocker (see [patch](./patches/11-hide-appoffline-banner.patch)) | +| `--enable-wayland-ime` `--ozone-platform-hint=auto` `--wayland-text-input-version=3` | Enable IME keyboard support on Wayland | -| Environment variable | Options | Description | -| -------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `LOG_LEVEL` | `silly`,`debug`,`verbose`,`info`,`warning`,`error` | Set the log level (see [patch](./patches/07-log-level-environment-variable.patch)) | -| `DZ_DEVTOOLS` | `yes`,`no` | Enable the developer console (ctrl+shift+i) | +| Environment variable | Options | Description | +| --------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------ | +| `DZ_HIDE_APPOFFLINE_BANNER` | `yes`,`no` | Hide the "Application is offline" banner (see [patch](./patches/11-hide-appoffline-banner.patch)) | +| `LOG_LEVEL` | `silly`,`debug`,`verbose`,`info`,`warning`,`error` | Set the log level (see [patch](./patches/07-log-level-environment-variable.patch)) | +| `DZ_DEVTOOLS` | `yes`,`no` | Enable the developer console (ctrl+shift+i) | ## Building from source diff --git a/patches/11-hide-appoffline-banner.patch b/patches/11-hide-appoffline-banner.patch index ed6fb64..68c754e 100644 --- a/patches/11-hide-appoffline-banner.patch +++ b/patches/11-hide-appoffline-banner.patch @@ -1,62 +1,65 @@ -From eada05985500a3fb4c8dc0a9fa12a2300f785206 Mon Sep 17 00:00:00 2001 -From: Aurélien Hamy -Date: Mon, 26 May 2025 15:50:35 +0200 +From bbb88f846c94978959f4816069332b4d9f9f4dab Mon Sep 17 00:00:00 2001 +From: josselinonduty +Date: Tue, 8 Jul 2025 12:54:19 +0200 Subject: [PATCH] feat: add toggle to hide application offline banner This solves #123 by adding the `--hide-appoffline-banner` command-line argument to hide the annoying "Application is offline" banner, that sometimes appears when using a VPN or DNS level blocker. --- - build/index.html | 5 +++++ - build/main.js | 1 + - build/preload.js | 6 ++++++ - 3 files changed, 12 insertions(+) + build/index.html | 6 ++++++ + build/main.js | 5 +++++ + build/preload.js | 4 ++++ + 3 files changed, 15 insertions(+) diff --git a/build/index.html b/build/index.html -index 4efcd23..019e786 100644 +index 4efcd23..4be829c 100644 --- a/build/index.html +++ b/build/index.html -@@ -86,6 +86,11 @@ +@@ -86,6 +86,12 @@ width: auto !important; } } + + /* hide the offline alert when needed */ -+ .hide-AppOffline-banner .alert-wrapper:has(> div[data-testid="alert-AppOffline"]) { ++ .hide-AppOffline-banner ++ .alert-wrapper:has(> div[data-testid="alert-AppOffline"]) { + display: none !important; + } diff --git a/build/main.js b/build/main.js -index 99935cb..91c99fb 100644 +index 99935cb..1c16dbe 100644 --- a/build/main.js +++ b/build/main.js -@@ -3166,6 +3166,7 @@ +@@ -3166,6 +3166,11 @@ getRealPath(external_electron_namespaceObject.app, __dirname), "preload.js" ), -+ additionalArguments: [`--hide-appoffline-banner=${process.argv.some((arg) => arg === "--hide-appoffline-banner")}`], ++ additionalArguments: [ ++ (process.argv.some((arg) => arg === "--hide-appoffline-banner") || ++ "yes" === process.env.DZ_HIDE_APPOFFLINE_BANNER) && ++ "--hide-appoffline-banner", ++ ].filter(Boolean), }, windowOptions = { title: "Deezer Desktop", diff --git a/build/preload.js b/build/preload.js -index 1301e93..6814466 100644 +index 1301e93..05939c4 100644 --- a/build/preload.js +++ b/build/preload.js -@@ -538,6 +538,12 @@ +@@ -538,6 +538,10 @@ external_i18next_default().dir(external_i18next_default().language) ? "rtl" : "ltr"); -+ if (process.argv.some((arg) => arg === "--hide-appoffline-banner=true")) ++ if (process.argv.some((arg) => arg === "--hide-appoffline-banner")) + document + .getElementsByTagName("body")[0] -+ .classList.add( -+ "hide-AppOffline-banner" -+ ); ++ .classList.add("hide-AppOffline-banner"); }); })(), (module.exports = __webpack_exports__); -- -2.49.0 +2.48.1 From 260f18250459c7523e89e492f0139fa815dae28c Mon Sep 17 00:00:00 2001 From: josselinonduty Date: Tue, 8 Jul 2025 13:11:27 +0200 Subject: [PATCH 7/8] chore: add author to patch --- patches/11-hide-appoffline-banner.patch | 1 + 1 file changed, 1 insertion(+) diff --git a/patches/11-hide-appoffline-banner.patch b/patches/11-hide-appoffline-banner.patch index 68c754e..e827657 100644 --- a/patches/11-hide-appoffline-banner.patch +++ b/patches/11-hide-appoffline-banner.patch @@ -3,6 +3,7 @@ From: josselinonduty Date: Tue, 8 Jul 2025 12:54:19 +0200 Subject: [PATCH] feat: add toggle to hide application offline banner +Original patch: Aurélien Hamy This solves #123 by adding the `--hide-appoffline-banner` command-line argument to hide the annoying "Application is offline" banner, that sometimes appears when using a VPN or DNS level blocker. From 9ac53b9b4e9dc60af717c9a62c7e9643603b082e Mon Sep 17 00:00:00 2001 From: josselinonduty Date: Tue, 8 Jul 2025 14:57:08 +0200 Subject: [PATCH 8/8] Feat: disable animations (cli/env) (#133). Closes #14 add option to disable animations via cli or environment variable --- Makefile | 2 + README.md | 2 + patches/12-disable-animations.patch | 60 +++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 patches/12-disable-animations.patch diff --git a/Makefile b/Makefile index 5ece2f8..224bdae 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,8 @@ prepare: clean install_build_deps @echo "09 - Add Discord Rich Presence (https://github.com/aunetx/deezer-linux/pull/82)" @echo "10 - Improve responsiveness on small devices (https://github.com/aunetx/deezer-linux/pull/122)" @echo "11 - Hide Application is offline banner (https://github.com/aunetx/deezer-linux/pull/124)" + @echo "12 - Disable animations (https://github.com/aunetx/deezer-linux/pull/133)" + @$(foreach p, $(wildcard ./patches/*), patch -p 1 -d $(APP_DIR) < $(p);) @echo "Append `package-append.json` to the `package.json` of the app" diff --git a/README.md b/README.md index 247c0ce..1e0102e 100644 --- a/README.md +++ b/README.md @@ -45,11 +45,13 @@ Other packages can be installed from you package manager, either by clicking on | `--disable-features` | Disable some features (see [patch](./patches/06-better-management-of-MPRIS.patch)) | | `--enable-discord-rpc` | Enable Discord RPC integration (see [patch](./patches/09-discord-rich-presence.patch)) | | `--hide-appoffline-banner` | Hide the "Application is offline" banner that appears when using a VPN or DNS blocker (see [patch](./patches/11-hide-appoffline-banner.patch)) | +| `--disable-animations` | Disable animations (see [patch](./patches/12-disable-animations.patch)) | | `--enable-wayland-ime` `--ozone-platform-hint=auto` `--wayland-text-input-version=3` | Enable IME keyboard support on Wayland | | Environment variable | Options | Description | | --------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------ | | `DZ_HIDE_APPOFFLINE_BANNER` | `yes`,`no` | Hide the "Application is offline" banner (see [patch](./patches/11-hide-appoffline-banner.patch)) | +| `DZ_DISABLE_ANIMATIONS` | `yes`,`no` | Disable animations (see [patch](./patches/12-disable-animations.patch)) | | `LOG_LEVEL` | `silly`,`debug`,`verbose`,`info`,`warning`,`error` | Set the log level (see [patch](./patches/07-log-level-environment-variable.patch)) | | `DZ_DEVTOOLS` | `yes`,`no` | Enable the developer console (ctrl+shift+i) | diff --git a/patches/12-disable-animations.patch b/patches/12-disable-animations.patch new file mode 100644 index 0000000..0dbe4ba --- /dev/null +++ b/patches/12-disable-animations.patch @@ -0,0 +1,60 @@ +From a220daa47a06d19ff6a995d567c0f46e42d14f6b Mon Sep 17 00:00:00 2001 +From: josselinonduty +Date: Tue, 8 Jul 2025 14:37:23 +0200 +Subject: [PATCH] feat(patch): disable animations (cli/env) + +--- + build/index.html | 6 ++++++ + build/main.js | 3 +++ + build/preload.js | 4 ++++ + 3 files changed, 13 insertions(+) + +diff --git a/build/index.html b/build/index.html +index 4be829c..2ef7709 100644 +--- a/build/index.html ++++ b/build/index.html +@@ -92,6 +92,12 @@ + .alert-wrapper:has(> div[data-testid="alert-AppOffline"]) { + display: none !important; + } ++ ++ /* Disable animations */ ++ .disable-animations * { ++ animation: none !important; ++ transition: none !important; ++ } + + + +diff --git a/build/main.js b/build/main.js +index 8fa4b6f..61028cd 100644 +--- a/build/main.js ++++ b/build/main.js +@@ -3246,6 +3246,9 @@ + (process.argv.some((arg) => arg === "--hide-appoffline-banner") || + "yes" === process.env.DZ_HIDE_APPOFFLINE_BANNER) && + "--hide-appoffline-banner", ++ (process.argv.some((arg) => arg === "--disable-animations") || ++ "yes" === process.env.DZ_DISABLE_ANIMATIONS) && ++ "--disable-animations", + ].filter(Boolean), + }, + windowOptions = { +diff --git a/build/preload.js b/build/preload.js +index 05939c4..0df9150 100644 +--- a/build/preload.js ++++ b/build/preload.js +@@ -542,6 +542,10 @@ + document + .getElementsByTagName("body")[0] + .classList.add("hide-AppOffline-banner"); ++ if (process.argv.some((arg) => arg === "--disable-animations")) ++ document ++ .getElementsByTagName("body")[0] ++ .classList.add("disable-animations"); + }); + })(), + (module.exports = __webpack_exports__); +-- +2.48.1 +