From 7ca5b2b5d0f49ae946e2a3604f816589e24418f5 Mon Sep 17 00:00:00 2001 From: josselinonduty Date: Mon, 20 Jan 2025 00:51:05 +0100 Subject: [PATCH] fix(patch): disable auto update - useless for this unofficial port --- patches/disable-auto-updater.patch | 28 +++++++ ...emove-kernel-version-from-user-agent.patch | 83 ------------------- 2 files changed, 28 insertions(+), 83 deletions(-) create mode 100644 patches/disable-auto-updater.patch delete mode 100644 patches/remove-kernel-version-from-user-agent.patch diff --git a/patches/disable-auto-updater.patch b/patches/disable-auto-updater.patch new file mode 100644 index 0000000..a0b1dbb --- /dev/null +++ b/patches/disable-auto-updater.patch @@ -0,0 +1,28 @@ +From 864e07d4bac769cbc077a4a3d50a431f2158080c Mon Sep 17 00:00:00 2001 +From: josselinonduty +Date: Mon, 20 Jan 2025 00:46:23 +0100 +Subject: [PATCH] fix: disable autoupdater for linux + +--- + build/main.js | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/build/main.js b/build/main.js +index 9ea7c18..10a80fa 100644 +--- a/build/main.js ++++ b/build/main.js +@@ -2322,9 +2322,8 @@ + } + } + init() { +- this.arch && +- ((isPlatform(PLATFORM.LINUX) && !process.env.APPIMAGE) || +- isWindowsStore() || ++ this.arch && !isPlatform(PLATFORM.LINUX) && ( ++ isWindowsStore() || + "yes" === process.env.DZ_DISABLE_UPDATE || + ((external_electron_updater_namespaceObject.autoUpdater.autoDownload = + !0), +-- +2.43.0 + diff --git a/patches/remove-kernel-version-from-user-agent.patch b/patches/remove-kernel-version-from-user-agent.patch deleted file mode 100644 index 37924d4..0000000 --- a/patches/remove-kernel-version-from-user-agent.patch +++ /dev/null @@ -1,83 +0,0 @@ -From: Dorian Stoll -Date: Sat, 29 Jan 2022 12:30:00 +0100 -Subject: [PATCH] Remove kernel version from User-Agent - -The application sends the kernel version as part of the User-Agent. -However, the Deezer API seems to assume the number to follow semver, -and can get confused when it doesn't. This then leads to some features -like dark mode being reported as unavailable. - -e.g: 5.11.0-16-generic works, while 5.15.14-200.fc35.x86_64 doesn't. - -The solution is to ignore the actual version and send bogus data that -is known to work. ---- - build/main.js | 4 +++- - build/preload.js | 4 +++- - build/renderer.js | 4 +++- - build/titlebar.js | 4 +++- - 4 files changed, 12 insertions(+), 4 deletions(-) - -diff --git a/build/main.js b/build/main.js -index b8e2459..2da2ed1 100644 ---- a/build/main.js -+++ b/build/main.js -@@ -5,7 +5,9 @@ - module.exports = require("macos-version"); - }, - 87: (module) => { -- module.exports = require("os"); -+ var m = require("os"); -+ m.release = function() { return "0.0.0"; } -+ module.exports = m; - }, - }, - __webpack_module_cache__ = {}; -diff --git a/build/preload.js b/build/preload.js -index 912f8ee..a8bb8d6 100644 ---- a/build/preload.js -+++ b/build/preload.js -@@ -5,7 +5,9 @@ - module.exports = require("macos-version"); - }, - 87: (module) => { -- module.exports = require("os"); -+ var m = require("os"); -+ m.release = function() { return "0.0.0"; } -+ module.exports = m; - }, - }, - __webpack_module_cache__ = {}; -diff --git a/build/renderer.js b/build/renderer.js -index 6e7787f..026c052 100644 ---- a/build/renderer.js -+++ b/build/renderer.js -@@ -5,7 +5,9 @@ - module.exports = require("macos-version"); - }, - 87: (module) => { -- module.exports = require("os"); -+ var m = require("os"); -+ m.release = function() { return "0.0.0"; } -+ module.exports = m; - }, - }, - __webpack_module_cache__ = {}; -diff --git a/build/titlebar.js b/build/titlebar.js -index 3d2aaca..052553b 100644 ---- a/build/titlebar.js -+++ b/build/titlebar.js -@@ -5,7 +5,9 @@ - module.exports = require("macos-version"); - }, - 87: (module) => { -- module.exports = require("os"); -+ var m = require("os"); -+ m.release = function() { return "0.0.0"; } -+ module.exports = m; - }, - }, - __webpack_module_cache__ = {}; --- -2.34.1 -