fix(patch): disable auto update - useless for this unofficial port

This commit is contained in:
josselinonduty 2025-01-20 00:51:05 +01:00
parent 9d6ad6fd88
commit 7ca5b2b5d0
No known key found for this signature in database
2 changed files with 28 additions and 83 deletions

View File

@ -0,0 +1,28 @@
From 864e07d4bac769cbc077a4a3d50a431f2158080c Mon Sep 17 00:00:00 2001
From: josselinonduty <contact@josselinonduty.fr>
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

View File

@ -1,83 +0,0 @@
From: Dorian Stoll <dorian.stoll@tmsp.io>
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