diff options
author | Sibren Vasse | 2022-05-20 15:40:50 +0200 |
---|---|---|
committer | Sibren Vasse | 2022-05-20 15:41:06 +0200 |
commit | 1d2b24e88597093e823f2174c065f05d272009cf (patch) | |
tree | cf6864b326244d3b0044a88711474c298ece5c97 | |
parent | e911f45a4217d275fbb496b9385515955676d7df (diff) | |
download | aur-1d2b24e88597093e823f2174c065f05d272009cf.tar.gz |
v5.30.230-2: merge patches from https://github.com/aunetx/deezer-linux
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 25 | ||||
-rw-r--r-- | avoid-change-default-texthtml-mime-type.patch | 18 | ||||
-rw-r--r-- | fix-isDev-usage.patch | 54 | ||||
-rw-r--r-- | quit.patch | 7 | ||||
-rw-r--r-- | remove-kernel-version-from-user-agent.patch | 83 | ||||
-rw-r--r-- | start-hidden-in-tray.patch (renamed from start-hidden-on-tray.patch) | 2 |
7 files changed, 188 insertions, 13 deletions
@@ -16,12 +16,18 @@ pkgbase = deezer source = deezer-5.30.230-setup.exe::https://www.deezer.com/desktop/download/artifact/win32/x86/5.30.230 source = deezer.desktop source = deezer - source = start-hidden-on-tray.patch + source = remove-kernel-version-from-user-agent.patch + source = avoid-change-default-texthtml-mime-type.patch + source = fix-isDev-usage.patch + source = start-hidden-in-tray.patch source = quit.patch sha256sums = 6a6346d55fafc979c86835e0b3235fec8bed35914342959e879a0a713de67caa sha256sums = f8a5279239b56082a5c85487b0c261fb332623f27dac3ec8093458b8c55d8d99 sha256sums = b464dbfc0d426730259ce2abc660960ecc6a73bbef838b8fbbd15deb2f5dce53 - sha256sums = 2254632a03ca2cf7ae6b50a4109b0bec417cf0db6d669a8037125d13488e3b9f - sha256sums = d3f96ae6019abb60aa097919b22b1873f83061ed7453cd251e43b3afe5d54919 + sha256sums = ec87bbcc5a615c61c78bf117889d5b697a2174150722b1318205ad1c903286f2 + sha256sums = 357b1e208aa58353a0fd176318b4628a7bed3210686e35f8d30399c750c99b0d + sha256sums = 731d25269ed260b386ad40937e38b6f56634cf7a13e2a98a8eaf53a778026161 + sha256sums = 505bc0363443f8a921361efb5f204a15afa7773e57fa386c2221ba1609b896c8 + sha256sums = 78d26c08c234594eeba0ac68c95612a8c01ea4026f34e0141e8a997287b0af1b pkgname = deezer @@ -13,13 +13,19 @@ makedepends=('p7zip' 'asar' 'prettier' 'imagemagick' 'npm' 'nodejs') source=("$pkgname-$pkgver-setup.exe::https://www.deezer.com/desktop/download/artifact/win32/x86/$pkgver" "$pkgname.desktop" deezer - start-hidden-on-tray.patch + remove-kernel-version-from-user-agent.patch + avoid-change-default-texthtml-mime-type.patch + fix-isDev-usage.patch + start-hidden-in-tray.patch quit.patch) sha256sums=('6a6346d55fafc979c86835e0b3235fec8bed35914342959e879a0a713de67caa' 'f8a5279239b56082a5c85487b0c261fb332623f27dac3ec8093458b8c55d8d99' 'b464dbfc0d426730259ce2abc660960ecc6a73bbef838b8fbbd15deb2f5dce53' - '2254632a03ca2cf7ae6b50a4109b0bec417cf0db6d669a8037125d13488e3b9f' - 'd3f96ae6019abb60aa097919b22b1873f83061ed7453cd251e43b3afe5d54919') + 'ec87bbcc5a615c61c78bf117889d5b697a2174150722b1318205ad1c903286f2' + '357b1e208aa58353a0fd176318b4628a7bed3210686e35f8d30399c750c99b0d' + '731d25269ed260b386ad40937e38b6f56634cf7a13e2a98a8eaf53a778026161' + '505bc0363443f8a921361efb5f204a15afa7773e57fa386c2221ba1609b896c8' + '78d26c08c234594eeba0ac68c95612a8c01ea4026f34e0141e8a997287b0af1b') prepare() { # Extract app from installer @@ -38,10 +44,15 @@ prepare() { install -Dm644 "$srcdir/resources/win/systray.png" resources/linux/ prettier --write "build/*.js" - # Hide to tray (https://github.com/SibrenVasse/deezer/issues/4) - patch --forward --strip=1 --input="$srcdir/quit.patch" - # Add start in tray cli option (https://github.com/SibrenVasse/deezer/pull/12) - patch --forward --strip=1 --input="$srcdir/start-hidden-on-tray.patch" + + local src + for src in "${source[@]}"; do + src="${src%%::*}" + src="${src##*/}" + [[ $src = *.patch ]] || continue + echo "Applying patch ${src}..." + patch -Np1 < "${srcdir}/${src}" + done cd "$srcdir/resources/" asar pack app app.asar diff --git a/avoid-change-default-texthtml-mime-type.patch b/avoid-change-default-texthtml-mime-type.patch new file mode 100644 index 000000000000..aa563c882ace --- /dev/null +++ b/avoid-change-default-texthtml-mime-type.patch @@ -0,0 +1,18 @@ +diff --git a/build/main.js b/build/main.js +index de51acb..e2c0b9e 100644 +--- a/build/main.js ++++ b/build/main.js +@@ -2897,12 +2897,7 @@ + this.tray.init(), + this.updater.init(), + this.network.watch(), +- this.powerSave.check(), +- this.deepLink.getSchemes().forEach((scheme) => { +- external_electron_namespaceObject.app.setAsDefaultProtocolClient( +- scheme +- ); +- }); ++ this.powerSave.check(); + const dzrFilter = { urls: ["*://*/*"] }, + DOMAINS_WHITELIST = [ + "deezer.com", diff --git a/fix-isDev-usage.patch b/fix-isDev-usage.patch new file mode 100644 index 000000000000..c38ee2fe6ba1 --- /dev/null +++ b/fix-isDev-usage.patch @@ -0,0 +1,54 @@ +From: Dorian Stoll <dorian.stoll@tmsp.io> +Date: Sat, 5 Feb 2022 07:05:16 +0100 +Subject: [PATCH] Fix isDev() usage + +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 | 6 +++--- + build/preload.js | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/build/main.js b/build/main.js +index 2da2ed1..88135ae 100644 +--- a/build/main.js ++++ b/build/main.js +@@ -1979,7 +1979,7 @@ + tags: Object.assign( + { country: user.country, offerId: user.offerId }, + { +- environment: isDev ? "development" : "production", ++ environment: isDev() ? "development" : "production", + os: `${external_os_default().type()} ${external_os_default().release()}`, + "os.name": external_os_default().type(), + arch: process.arch, +@@ -3268,10 +3268,10 @@ + (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 ++ (external_electron_log_default().transports.console.level = isDev() + ? "silly" + : "warn"), +- (external_electron_log_default().transports.file.level = isDev ++ (external_electron_log_default().transports.file.level = isDev() + ? "silly" + : "warn"), + (external_electron_log_default().transports.sentry = function (msg) { +diff --git a/build/preload.js b/build/preload.js +index a8bb8d6..73dc8b4 100644 +--- a/build/preload.js ++++ b/build/preload.js +@@ -490,7 +490,7 @@ + } + getSentryTags() { + return { +- environment: isDev ? "development" : "production", ++ environment: isDev() ? "development" : "production", + os: `${external_os_default().type()} ${external_os_default().release()}`, + "os.name": external_os_default().type(), + arch: process.arch, +-- +2.34.1 + diff --git a/quit.patch b/quit.patch index 31fb2432b86c..edbb77632bfb 100644 --- a/quit.patch +++ b/quit.patch @@ -2,12 +2,15 @@ diff --git a/build/main.js b/build/main.js index 5066eef..46b04c5 100644 --- a/build/main.js +++ b/build/main.js -@@ -3079,7 +3080,7 @@ +@@ -3083,7 +3083,10 @@ this._adjustViewToContentSize(), mainView.setAutoResize({ width: !0, height: !0 }); } else this.appService.setWindow(this.window, void 0); - if ((this.appService.setUserAgent(), isPlatform(PLATFORM.DARWIN))) { -+ if ((this.appService.setUserAgent(), isPlatform(PLATFORM.LINUX))) { ++ if ( ++ (this.appService.setUserAgent(), isPlatform(PLATFORM.LINUX)) ++ && !process.argv.some(arg => arg === '--disable-systray') ++ ) { let isQuitting = !1; external_electron_namespaceObject.app.on( "before-quit", diff --git a/remove-kernel-version-from-user-agent.patch b/remove-kernel-version-from-user-agent.patch new file mode 100644 index 000000000000..37924d4a1b99 --- /dev/null +++ b/remove-kernel-version-from-user-agent.patch @@ -0,0 +1,83 @@ +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 + diff --git a/start-hidden-on-tray.patch b/start-hidden-in-tray.patch index ffc44b048dec..52defae164ee 100644 --- a/start-hidden-on-tray.patch +++ b/start-hidden-in-tray.patch @@ -16,4 +16,4 @@ index 5066eef..592a6bc 100644 + } }), this.appService.enableDevMode(); - } + }
\ No newline at end of file |