From 74ffd4811c4aa598b62f7034df287f1fbbce5176 Mon Sep 17 00:00:00 2001 From: child_duckling <19170969+quacksire@users.noreply.github.com> Date: Sat, 5 Feb 2022 16:37:00 -0800 Subject: [PATCH] macOS handoff and cider go beep --- package.json | 5 +++++ src/main/base/app.ts | 10 ++++++++++ src/main/base/browserwindow.ts | 3 +++ 3 files changed, 18 insertions(+) diff --git a/package.json b/package.json index 57a2c1a6..7d189bf0 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "dependencies": { "@sentry/electron": "^2.5.4", "@sentry/integrations": "^6.17.4", + "castv2-client": "^1.2.0", "discord-rpc": "^4.0.1", "ejs": "^3.1.6", "electron-fetch": "^1.7.4", @@ -47,14 +48,18 @@ "mpris-service": "^2.1.2", "music-metadata": "^7.11.4", "node-gyp": "^8.4.1", + "node-ssdp": "^4.0.1", "qrcode": "^1.5.0", "qrcode-terminal": "^0.12.0", "react": "^17.0.2", "react-dom": "^17.0.2", "run-script-os": "^1.1.6", "source-map-support": "^0.5.21", + "tsc": "^2.0.4", "typescript": "^4.5.5", + "upnp-mediarenderer-client": "^1.4.0", "v8-compile-cache": "^2.3.0", + "wavefile": "^11.0.0", "ws": "^8.4.2", "xml2js": "^0.4.23", "youtube-search-without-api-key": "^1.0.7" diff --git a/src/main/base/app.ts b/src/main/base/app.ts index 913d3947..7aae7e89 100644 --- a/src/main/base/app.ts +++ b/src/main/base/app.ts @@ -174,6 +174,16 @@ export class AppEvents { utils.getWindow().webContents.send('play', 'url', url) } else if (arg.includes('/debug/appdata')) { shell.openPath(app.getPath('userData')) + } else if (arg.includes('/debug/logs')) { + shell.openPath(app.getPath('logs')) + } else if (arg.includes('/discord')) { + shell.openExternal('https://discord.gg/applemusic') + } else if (arg.includes('/github')) { + shell.openExternal('https://github.com/ciderapp/cider') + } else if (arg.includes('/donate')) { + shell.openExternal('https://opencollective.com/ciderapp') + } else if (arg.includes('/beep')) { + shell.beep() } } diff --git a/src/main/base/browserwindow.ts b/src/main/base/browserwindow.ts index 8b5b7f03..19db105b 100644 --- a/src/main/base/browserwindow.ts +++ b/src/main/base/browserwindow.ts @@ -549,6 +549,9 @@ export class BrowserWindow { let url = `http://${BrowserWindow.getIP()}:${this.remotePort}`; BrowserWindow.win.webContents.send('send-remote-pair-url', url); }) + app.setUserActivity('com.CiderCollective.remote.pair', { + ip: `${BrowserWindow.getIP()}` + }, `http://${BrowserWindow.getIP()}:${this.remotePort}`); // Get previews for normalization ipcMain.on("getPreviewURL", (_event, url) => {