From c540805324b12006ef3e84d5cb0679dd55119e12 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Thu, 18 Aug 2022 23:55:05 +0700 Subject: [PATCH] attempt fixes for ap --- src/main/plugins/raop.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/plugins/raop.ts b/src/main/plugins/raop.ts index af2ea7a3..a8e1be74 100644 --- a/src/main/plugins/raop.ts +++ b/src/main/plugins/raop.ts @@ -103,7 +103,7 @@ export default class RAOP { if ( this.castDevices.findIndex((item: any) => { - return item != null && item.name == shown_name && item.port == port && item.host == host_name; + return item != null && item.name == shown_name && item.port == port && item.host == host_name && item.host != "Unknown"; }) == -1 ) { this.castDevices.push({ @@ -114,9 +114,9 @@ export default class RAOP { txt: text, airplay2: airplay2, }); - if (this.devices.indexOf(host_name) === -1) { - this.devices.push(host_name); - } + // if (this.devices.indexOf(host_name) === -1) { + // this.devices.push(host_name); + // } if (shown_name) { this._win.webContents.executeJavaScript(`console.log('deviceFound','ip: ${host_name} name:${shown_name}')`).catch((err: any) => console.error(err)); console.log("deviceFound", host_name, shown_name);