diff --git a/Makefile b/Makefile index c477a22..d47e2e8 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ VERSION_REGEX = ^v$(PKGVER)-[0-9]{1,}$$ install_build_deps: - @npm install --engine-strict asar + @npm install --engine-strict @electron/asar@3.2.18 @npm install prettier@2.8.8 prepare: clean install_build_deps @@ -27,23 +27,23 @@ prepare: clean install_build_deps @cd source && 7z x -y -bsp0 -bso0 app-32.7z @echo "Extract app sources from the app" - @node_modules/asar/bin/asar.js extract source/resources/app.asar app + @node_modules/@electron/asar/bin/asar.js extract source/resources/app.asar app @echo "Prettier the sources to patch successfully" @node_modules/prettier/bin-prettier.js --write "app/build/*.js" - @echo "Apply patches from ./patches, default ones:" - @echo "Hide to tray when closing (https://github.com/SibrenVasse/deezer/issues/4)" - @echo "Start in tray cli option (https://github.com/SibrenVasse/deezer/pull/12)" - @echo "Remove kernel version from User-Agent (https://github.com/aunetx/deezer-linux/pull/9)" - @echo "Avoid to set the text/html mime type (https://github.com/aunetx/deezer-linux/issues/13)" - @echo "Add a better management of MPRIS (https://github.com/aunetx/deezer-linux/pull/61)" + @echo "Apply patches from ./patches:" + @echo "- Hide to tray when closing (https://github.com/SibrenVasse/deezer/issues/4)" + @echo "- Start in tray cli option (https://github.com/SibrenVasse/deezer/pull/12)" + @echo "- Avoid to set the text/html mime type (https://github.com/aunetx/deezer-linux/issues/13)" + @echo "- Add a better management of MPRIS (https://github.com/aunetx/deezer-linux/pull/61)" + @echo "- Disable auto updater (https://github.com/aunetx/deezer-linux/pull/95)" + @echo "- Remove OS information (https://github.com/aunetx/deezer-linux/pull/95)" $(foreach p, $(wildcard ./patches/*), patch -p1 -dapp < $(p);) @echo "Append `package-append.json` to the `package.json` of the app" - @echo "Adds electron, elecron-builder dependencies, and build directives" - @head -n -1 app/package.json > tmp.txt && mv tmp.txt app/package.json - @cat package-append.json | tee -a app/package.json + @echo "Adds electron, elecron-builder dependencies, prod and build directives" + @jq -s '.[0] * .[1]' app/package.json package-append.json > app/tmp.json && mv app/tmp.json app/package.json @echo "Download new packages" @npm i diff --git a/dev.aunetx.deezer.json b/dev.aunetx.deezer.json index b1638c8..452a276 100644 --- a/dev.aunetx.deezer.json +++ b/dev.aunetx.deezer.json @@ -6,8 +6,8 @@ "sources": [ { "type": "archive", - "url": "https://e-cdn-content.dzcdn.net/builds/deezer-desktop/8cF2rAuKxLcU1oMDmCYm8Uiqe19Ql0HTySLssdzLkQ9ZWHuDTp2JBtQOvdrFzWPA/win32/x86/6.0.150/DeezerDesktopSetup_6.0.150.exe", - "sha256": "0ecf85dc7988bc1c26bf12f22b800eeb813b943b7453b8ac5fa9a103ccc075f5", + "url": "https://e-cdn-content.dzcdn.net/builds/deezer-desktop/8cF2rAuKxLcU1oMDmCYm8Uiqe19Ql0HTySLssdzLkQ9ZWHuDTp2JBtQOvdrFzWPA/win32/x86/7.0.1/DeezerDesktopSetup_7.0.1.exe", + "sha256": "1ae2de0b55d564da53832cab86eed076132ad1df7420b85b4e6bdfa606a1b195", "only-arches": ["x86_64"], "dest": "archive", "x-checker-data": { diff --git a/package-append.json b/package-append.json index 6bdbeca..4b7e59e 100644 --- a/package-append.json +++ b/package-append.json @@ -1,4 +1,5 @@ - ,"scripts": { +{ + "scripts": { "copy-resources": "mkdir -p resources/linux && cp ../extra/linux/* ./resources/linux", "start": "yarn run copy-resources && electron .", "prepare-flatpak": "electron-builder --linux --dir", @@ -15,13 +16,11 @@ "build-appimage-arm64": "electron-builder --arm64 --linux AppImage" }, "devDependencies": { - "electron": "^13.6.9", + "electron": "^33.2.0", "electron-builder": "^23.0.3" }, "build": { - "files": [ - "**" - ], + "files": ["**"], "directories": { "buildResources": "build", "output": "../artifacts/${arch}" diff --git a/patches/avoid-change-default-texthtml-mime-type.patch b/patches/avoid-change-default-texthtml-mime-type.patch index aa563c8..6d826c6 100644 --- a/patches/avoid-change-default-texthtml-mime-type.patch +++ b/patches/avoid-change-default-texthtml-mime-type.patch @@ -1,8 +1,17 @@ +From e45c184e8c23aa72f77767c09e6051363806b5f5 Mon Sep 17 00:00:00 2001 +From: josselinonduty +Date: Sun, 19 Jan 2025 23:18:25 +0100 +Subject: [PATCH] fix: unset text/html as default mimetype + +--- + build/main.js | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + diff --git a/build/main.js b/build/main.js -index de51acb..e2c0b9e 100644 +index b883a28..60117e3 100644 --- a/build/main.js +++ b/build/main.js -@@ -2897,12 +2897,7 @@ +@@ -2854,12 +2854,7 @@ this.tray.init(), this.updater.init(), this.network.watch(), @@ -16,3 +25,6 @@ index de51acb..e2c0b9e 100644 const dzrFilter = { urls: ["*://*/*"] }, DOMAINS_WHITELIST = [ "deezer.com", +-- +2.43.0 + diff --git a/patches/better-management-of-MPRIS.patch b/patches/better-management-of-MPRIS.patch index 43d5b17..b4422d1 100644 --- a/patches/better-management-of-MPRIS.patch +++ b/patches/better-management-of-MPRIS.patch @@ -1,17 +1,29 @@ ---- a/build/main.js 2024-05-10 19:00:37.087094880 +0200 -+++ b/build/main.js 2024-05-11 17:21:00.996945543 +0200 -@@ -72,6 +72,10 @@ - var external_url_default = __webpack_require__.n( - external_url_namespaceObject - ); +From bbb6b3ccd7f2a0391a4596fbf43d5c81ffec8bc9 Mon Sep 17 00:00:00 2001 +From: josselinonduty +Date: Mon, 20 Jan 2025 16:53:02 +0100 +Subject: [PATCH] fix: add better management of MPRIS metadata + +--- + build/main.js | 72 ++++++++++++++++++++++++++++++++++++++++++--------- + package.json | 1 + + 2 files changed, 61 insertions(+), 12 deletions(-) + +diff --git a/build/main.js b/build/main.js +index 10a80fa..f50c03d 100644 +--- a/build/main.js ++++ b/build/main.js +@@ -79,6 +79,10 @@ + external_semver_default = __webpack_require__.n( + external_semver_namespaceObject + ); + const external_electron_mpris_namespaceObject = require("mpris-service"); + var external_electron_mpris_default = __webpack_require__.n( + external_electron_mpris_namespaceObject + ); - const external_inversify_namespaceObject = require("inversify"), - external_events_namespaceObject = require("events"), - external_semver_namespaceObject = -@@ -1221,8 +1225,9 @@ + function isPlatform(platform) { + switch (platform) { + case PLATFORM.WINDOWS: +@@ -1179,8 +1183,9 @@ }; }; let MediaService = class extends external_events_namespaceObject.EventEmitter { @@ -22,7 +34,7 @@ (this.smtc = null), (this.track = {}), (this.player = {}), -@@ -1230,6 +1235,11 @@ +@@ -1188,6 +1193,11 @@ (this.debounceOptions = { leading: !0, maxWait: 500 }), (this.ipc = ipc), (this.user = user), @@ -34,12 +46,12 @@ isPlatform(PLATFORM.LINUX) && (this.user.addListener(UserEvents.LoggedIn, () => { this.start(); -@@ -1237,6 +1247,19 @@ +@@ -1195,6 +1205,19 @@ this.user.addListener(UserEvents.LoggedOut, () => { this.stop(); })); -+ this.initMprisPlayerControls(); -+ } ++ this.initMprisPlayerControls(); ++ } + initMprisPlayerControls() { + // Events => ['raise', 'quit', 'next', 'previous', 'pause', 'playpause', 'stop', 'play', 'seek', 'position', 'open', 'volume', 'loopStatus', 'shuffle']; + this.mprisPlayer.on('play', this.play.bind(this)); @@ -50,35 +62,37 @@ + this.mprisPlayer.on('previous', this.prev.bind(this)); + this.mprisPlayer.on('shuffle', this.setSuffle.bind(this)); + this.mprisPlayer.on('loopStatus', this.setRepeatMode.bind(this)); -+ this.mprisPlayer.on('raise', () => this.app.getWindow().show()); ++ this.mprisPlayer.on('raise', () => this.app.getWindow().show()) } play() { this.ipc.send("channel-player-media-control", MediaPlayerControl.Play); -@@ -1264,11 +1287,22 @@ +@@ -1222,11 +1245,23 @@ } setTrackInfo(track) { (this.track = Object.assign(this.track, track)), - this.emit(MediaEvents.TrackUpdated, this.track); + this.emit(MediaEvents.TrackUpdated, this.track), + (this.mprisPlayer.metadata = { -+ 'mpris:trackid': this.mprisPlayer.objectPath('track/0'), -+ 'mpris:artUrl': track.coverUrl, -+ 'xesam:title': track.title, -+ 'xesam:album': track.album, -+ 'xesam:artist': [track.artist] -+ }); ++ 'mpris:trackid': this.mprisPlayer.objectPath('track/0'), ++ 'mpris:artUrl': track.coverUrl, ++ 'xesam:title': track.title, ++ 'xesam:album': track.album, ++ 'xesam:artist': [track.artist] ++ }); } setPlayerInfo(player) { (this.player = Object.assign(this.player, player)), - this.emit(MediaEvents.PlayerUpdated, this.player); -+ (this.mprisPlayer.playbackStatus = -+ this.player.state === 'playing' -+ ? external_electron_mpris_namespaceObject.PLAYBACK_STATUS_PLAYING -+ : external_electron_mpris_namespaceObject.PLAYBACK_STATUS_PAUSED); +- this.emit(MediaEvents.PlayerUpdated, this.player); ++ this.emit(MediaEvents.PlayerUpdated, this.player), ++ (this.mprisPlayer.playbackStatus = ++ this.player.state === 'playing' ++ ? external_electron_mpris_namespaceObject.PLAYBACK_STATUS_PLAYING ++ : external_electron_mpris_namespaceObject.PLAYBACK_STATUS_PAUSED ++ ); } getTrackInfo() { return this.track; -@@ -1328,7 +1362,11 @@ +@@ -1286,7 +1321,11 @@ 1, (0, external_inversify_namespaceObject.inject)(SERVICE_USER) ), @@ -91,31 +105,36 @@ ], MediaService ); -@@ -2766,14 +2804,18 @@ +@@ -2724,14 +2763,20 @@ const PlayerIpc_ipc = main_di.get(SERVICE_IPC), media = main_di.get(SERVICE_MEDIA), powerSave = main_di.get(SERVICE_POWER_SAVE); -+ let powerSaveTimoutId; - PlayerIpc_ipc.on( - "channel-player-state-update", +- PlayerIpc_ipc.on( +- "channel-player-state-update", - external_lodash_debounce_default()((event, state) => { - media.setPlayerInfo({ state }), -+ (event, state) => { -+ media.setPlayerInfo({ state }); -+ clearTimeout(powerSaveTimoutId); -+ powerSaveTimoutId = setTimeout(()=> { - state === MediaPlayerState.Playing +- state === MediaPlayerState.Playing - ? powerSave.start() - : powerSave.stop(); - }, 3e3) -+ ? powerSave.start() -+ : powerSave.stop(); -+ }, 3e3); -+ } ++ var powerSaveTimeoutId; ++ PlayerIpc_ipc.on( ++ "channel-player-state-update", ++ (event, state) => { ++ media.setPlayerInfo({ state }), ++ clearTimeout(powerSaveTimeoutId), ++ powerSaveTimeoutId = setTimeout( ++ () => { ++ state === MediaPlayerState.Playing ++ ? powerSave.start() ++ : powerSave.stop(); ++ }, 3e3 ++ ); ++ } ), PlayerIpc_ipc.on( "channel-player-track-update", -@@ -2865,6 +2907,9 @@ +@@ -2819,6 +2864,9 @@ "autoplay-policy", "no-user-gesture-required" ), @@ -125,14 +144,18 @@ external_electron_namespaceObject.app.on( "second-instance", (event, argv) => { - ---- a/package.json 2024-05-10 19:00:37.091094948 +0200 -+++ b/package.json 2024-05-10 21:54:32.411123286 +0200 -@@ -25,6 +25,7 @@ +diff --git a/package.json b/package.json +index 290f49a..3560ca9 100644 +--- a/package.json ++++ b/package.json +@@ -26,6 +26,7 @@ "lodash.debounce": "^4.0.8", "lodash.get": "^4.4.2", "macos-version": "^5.2.1", + "mpris-service": "^2.1.2", - "object.assign": "^4.1.2", "raven": "^2.6.4", - "reflect-metadata": "^0.1.13", \ No newline at end of file + "reflect-metadata": "^0.2.2", + "semver": "^7.6.0", +-- +2.43.0 + 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/fix-isDev-usage.patch b/patches/fix-isDev-usage.patch deleted file mode 100644 index c38ee2f..0000000 --- a/patches/fix-isDev-usage.patch +++ /dev/null @@ -1,54 +0,0 @@ -From: Dorian Stoll -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/patches/quit.patch b/patches/quit.patch index edbb776..742f828 100644 --- a/patches/quit.patch +++ b/patches/quit.patch @@ -1,16 +1,29 @@ +From ef715c38d754bbed026a4e6c3e9cae0180eeeb4b Mon Sep 17 00:00:00 2001 +From: josselinonduty +Date: Sun, 19 Jan 2025 23:27:32 +0100 +Subject: [PATCH] fix: reduce to systray on close with respect to execution + option + +--- + build/main.js | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + diff --git a/build/main.js b/build/main.js -index 5066eef..46b04c5 100644 +index 60117e3..9ea7c18 100644 --- a/build/main.js +++ b/build/main.js -@@ -3083,7 +3083,10 @@ +@@ -3037,7 +3037,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)) -+ && !process.argv.some(arg => arg === '--disable-systray') ++ (this.appService.setUserAgent(), isPlatform(PLATFORM.LINUX)) ++ && !process.argv.some(arg => arg === '--disable-systray') + ) { let isQuitting = !1; external_electron_namespaceObject.app.on( "before-quit", +-- +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 - diff --git a/patches/remove-os-information.patch b/patches/remove-os-information.patch new file mode 100644 index 0000000..48970ac --- /dev/null +++ b/patches/remove-os-information.patch @@ -0,0 +1,87 @@ +From 83374279bba745cf9b4b4ab958b35738f97d12c7 Mon Sep 17 00:00:00 2001 +From: josselinonduty +Date: Mon, 20 Jan 2025 19:19:51 +0100 +Subject: [PATCH] fix: hide os information + +--- + build/main.js | 7 ++++++- + build/preload.js | 7 ++++++- + build/renderer.js | 7 ++++++- + build/titlebar.js | 7 ++++++- + 4 files changed, 24 insertions(+), 4 deletions(-) + +diff --git a/build/main.js b/build/main.js +index 10a80fa..e371d01 100644 +--- a/build/main.js ++++ b/build/main.js +@@ -5,7 +5,12 @@ + module.exports = require("macos-version"); + }, + 857: (module) => { +- module.exports = require("os"); ++ var __module_os = require("os"); ++ __module_os.release = () => "10.0.26100.2894"; ++ __module_os.version = () => "" ++ __module_os.platform = () => "win32"; ++ __module_os.type = () => "Windows_NT"; ++ module.exports = __module_os; + }, + }, + __webpack_module_cache__ = {}; +diff --git a/build/preload.js b/build/preload.js +index 9716411..f0fa2ab 100644 +--- a/build/preload.js ++++ b/build/preload.js +@@ -5,7 +5,12 @@ + module.exports = require("macos-version"); + }, + 857: (module) => { +- module.exports = require("os"); ++ var __module_os = require("os"); ++ __module_os.release = () => "10.0.26100.2894"; ++ __module_os.version = () => "" ++ __module_os.platform = () => "win32"; ++ __module_os.type = () => "Windows_NT"; ++ module.exports = __module_os; + }, + }, + __webpack_module_cache__ = {}; +diff --git a/build/renderer.js b/build/renderer.js +index 7241bcb..628bbaf 100644 +--- a/build/renderer.js ++++ b/build/renderer.js +@@ -5,7 +5,12 @@ + module.exports = require("macos-version"); + }, + 857: (module) => { +- module.exports = require("os"); ++ var __module_os = require("os"); ++ __module_os.release = () => "10.0.26100.2894"; ++ __module_os.version = () => "" ++ __module_os.platform = () => "win32"; ++ __module_os.type = () => "Windows_NT"; ++ module.exports = __module_os; + }, + }, + __webpack_module_cache__ = {}; +diff --git a/build/titlebar.js b/build/titlebar.js +index 65520fb..12ad58c 100644 +--- a/build/titlebar.js ++++ b/build/titlebar.js +@@ -5,7 +5,12 @@ + module.exports = require("macos-version"); + }, + 857: (module) => { +- module.exports = require("os"); ++ var __module_os = require("os"); ++ __module_os.release = () => "10.0.26100.2894"; ++ __module_os.version = () => "" ++ __module_os.platform = () => "win32"; ++ __module_os.type = () => "Windows_NT"; ++ module.exports = __module_os; + }, + }, + __webpack_module_cache__ = {}; +-- +2.43.0 + diff --git a/patches/start-hidden-in-tray.patch b/patches/start-hidden-in-tray.patch index 52defae..ad89045 100644 --- a/patches/start-hidden-in-tray.patch +++ b/patches/start-hidden-in-tray.patch @@ -1,19 +1,34 @@ +From 9c19490f706350a2ca8cceae7a998916d21de89b Mon Sep 17 00:00:00 2001 +From: josselinonduty +Date: Sun, 19 Jan 2025 22:59:38 +0100 +Subject: [PATCH] fix: reduce to systray on close + +--- + build/main.js | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + diff --git a/build/main.js b/build/main.js -index 5066eef..592a6bc 100644 +index c15e2c3..b883a28 100644 --- a/build/main.js +++ b/build/main.js -@@ -3122,8 +3122,12 @@ +@@ -3085,10 +3085,13 @@ finalMinSize[1] ); } -- isDev() ? this.window.showInactive() : this.window.show(), +- isDev(external_electron_namespaceObject.app) +- ? this.window.showInactive() +- : this.window.show(), - this.thumbar.init(); -+ if (!process.argv.some(arg => arg === '--start-in-tray')) { -+ isDev() ? this.window.showInactive() : this.window.show(), -+ this.thumbar.init(); -+ } else { ++ if (!process.argv.some(arg => arg === '--start-in-tray')) ++ isDev(external_electron_namespaceObject.app) ++ ? this.window.showInactive() ++ : this.window.show(), ++ this.thumbar.init(); ++ else + this.window.hide(); -+ } }), this.appService.enableDevMode(); - } \ No newline at end of file + } +-- +2.43.0 +