From 1f4f8b2e54cedb86c07e5af1db3f306c4e751c5a Mon Sep 17 00:00:00 2001 From: Brecht Yperman Date: Mon, 24 Oct 2022 11:35:56 +0200 Subject: [PATCH] Check if app is default protocol client before setting (#178) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Release of settings window and desktop file fixes (#169) * Update configuration of the desktop file (#165) * - Changed the category of the desktop file to AudioVideo - Changed desktop file name to "TIDAL Hi-Fi" * Redesign of the settings window (#168) * Pr dest (#166) * Update configuration of the desktop file (#165) * - Changed the category of the desktop file to AudioVideo - Changed desktop file name to "TIDAL Hi-Fi" Co-authored-by: Ivo Šmerek * Redesign of the settings window * changed sass to scss, fixed color of switches and disabled rounded corners Co-authored-by: Rick van Lieshout * - icon is set to new static path based on Arch/Debian - Name has changed to Tidal-Hifi Co-authored-by: Ivo Šmerek * Disable background throttling (#171) * disable background throttling for consistent setInterval * add disable throttle as config option * 4.3.0 * Check if app is default protocol client before setting Co-authored-by: Rick van Lieshout Co-authored-by: Ivo Šmerek Co-authored-by: Cukmekerb Co-authored-by: Brecht Yperman --- src/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index abbe7db..234c105 100644 --- a/src/main.js +++ b/src/main.js @@ -123,7 +123,9 @@ function registerHttpProtocols() { protocol.registerHttpProtocol(PROTOCOL_PREFIX, (request, _callback) => { mainWindow.loadURL(`${tidalUrl}/${request.url.substring(PROTOCOL_PREFIX.length + 3)}`); }); - app.setAsDefaultProtocolClient(PROTOCOL_PREFIX); + if (!app.isDefaultProtocolClient(PROTOCOL_PREFIX)) { + app.setAsDefaultProtocolClient(PROTOCOL_PREFIX); + } } function addGlobalShortcuts() {