diff --git a/patches/01-start-hidden-in-tray.patch b/patches/01-start-hidden-in-tray.patch index ad89045..00a8956 100644 --- a/patches/01-start-hidden-in-tray.patch +++ b/patches/01-start-hidden-in-tray.patch @@ -3,6 +3,10 @@ From: josselinonduty Date: Sun, 19 Jan 2025 22:59:38 +0100 Subject: [PATCH] fix: reduce to systray on close +Original patch: Dorian Stoll +This stops the excessive logging, since parts of the app will not run in development +mode anymore. It also stops the app from logging the urls for the mp3 files, which is +against the Deezer TOS. --- build/main.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/patches/05-remove-os-information.patch b/patches/05-remove-os-information.patch index a0a936e..1d994b1 100644 --- a/patches/05-remove-os-information.patch +++ b/patches/05-remove-os-information.patch @@ -3,6 +3,16 @@ From: josselinonduty Date: Fri, 24 Jan 2025 16:03:43 +0100 Subject: [PATCH] fix: ensure os release is valid +Original patch: Dorian Stoll +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 | 11 ++++++++++- build/preload.js | 10 +++++++++- diff --git a/patches/09-log-level-environment-variable.patch b/patches/09-log-level-environment-variable.patch index db5b901..fc4df83 100644 --- a/patches/09-log-level-environment-variable.patch +++ b/patches/09-log-level-environment-variable.patch @@ -1,14 +1,18 @@ -From 93a932ba99e8125169eeb512fa6f9a89a70eeb1e Mon Sep 17 00:00:00 2001 +From 43e2a95ada8852ffda95a9ea08bb7914d26c6d2f Mon Sep 17 00:00:00 2001 From: josselinonduty -Date: Sat, 1 Feb 2025 12:42:07 +0100 -Subject: [PATCH] feat: add log level env variable +Date: Sat, 1 Feb 2025 19:05:39 +0100 +Subject: [PATCH] fix: set default log level to "warn" to respect Deezer TOS +Original patch: Dorian Stoll +This stops the excessive logging, since parts of the app will not run in development +mode anymore. It also stops the app from logging the urls for the mp3 files, which is +against the Deezer TOS. --- - build/main.js | 30 +++++++++++++++++++++++++++++- - 1 file changed, 29 insertions(+), 1 deletion(-) + build/main.js | 39 ++++++++++++++++++++++++++++++++++----- + 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/build/main.js b/build/main.js -index 8b645c6..c62943b 100644 +index 8b645c6..686ac80 100644 --- a/build/main.js +++ b/build/main.js @@ -12,7 +12,7 @@ @@ -20,41 +24,58 @@ index 8b645c6..c62943b 100644 } module.exports = __module_os; }, -@@ -67,6 +67,34 @@ +@@ -67,6 +67,35 @@ var external_electron_log_default = __webpack_require__.n( external_electron_log_namespaceObject ); -+ function updateLogLevel() { -+ if (process.env.LOG_LEVEL) { -+ if (process.env.LOG_LEVEL !== "silly") -+ external_electron_log_default().silly = () => {}; -+ else return; ++ // function updateLogLevel() { ++ // const level = process.env.LOG_LEVEL; ++ // if (level) { ++ // if (level !== "silly") ++ // external_electron_log_default().silly = () => {}; ++ // else return; + -+ if (process.env.LOG_LEVEL !== "debug") -+ external_electron_log_default().debug = () => {}; -+ else return; ++ // if (level !== "debug") ++ // external_electron_log_default().debug = () => {}; ++ // else return; + -+ if (process.env.LOG_LEVEL !== "verbose") -+ external_electron_log_default().verbose = () => {}; -+ else return; ++ // if (level !== "verbose") ++ // external_electron_log_default().verbose = () => {}; ++ // else return; + -+ if (process.env.LOG_LEVEL !== "info") -+ external_electron_log_default().info = () => {}; -+ else return; ++ // if (level !== "info") ++ // external_electron_log_default().info = () => {}; ++ // else return; + -+ if (process.env.LOG_LEVEL !== "warn") -+ external_electron_log_default().warn = () => {}; -+ else return; ++ // if (level !== "warn") ++ // external_electron_log_default().warn = () => {}; ++ // else return; + -+ if (process.env.LOG_LEVEL !== "error") -+ external_electron_log_default().error = () => {}; -+ else return; -+ } -+ } -+ updateLogLevel(); ++ // if (level !== "error") ++ // external_electron_log_default().error = () => {}; ++ // else return; ++ // } ++ // } ++ // updateLogLevel(); const external_electron_settings_namespaceObject = require("electron-settings"); var external_electron_settings_default = __webpack_require__.n( external_electron_settings_namespaceObject +@@ -3329,11 +3358,11 @@ + (external_electron_log_default().transports.console.format = `{h}:{i}:{s}.{ms} ({processType}/{level}) ${ + isPlatform(PLATFORM.WINDOWS) ? ">" : "›" + } {text}`), +- (external_electron_log_default().transports.console.level = isDev +- ? "silly" ++ (external_electron_log_default().transports.console.level = isDev({isPackaged: true}) || process.env.LOG_LEVEL ++ ? process.env.LOG_LEVEL + : "warn"), +- (external_electron_log_default().transports.file.level = isDev +- ? "silly" ++ (external_electron_log_default().transports.file.level = isDev({isPackaged: true}) || !process.env.LOG_LEVEL ++ ? process.env.LOG_LEVEL + : "warn"), + (external_electron_log_default().transports.sentry = function (msg) { + "error" === msg.level && -- 2.43.0