txt
This commit is contained in:
parent
39802835d5
commit
c925e15b07
1 changed files with 6 additions and 4 deletions
|
@ -88,13 +88,14 @@ export default class RAOP {
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
private ondeviceup(name: any, host: any, port: any, addresses: any) {
|
private ondeviceup(name: any, host: any, port: any, addresses: any, text: any) {
|
||||||
if (this.castDevices.findIndex((item: any) => item.name === host && item.port === port && item.addresses === addresses) === -1) {
|
if (this.castDevices.findIndex((item: any) => item.name === host && item.port === port && item.addresses === addresses) === -1) {
|
||||||
this.castDevices.push({
|
this.castDevices.push({
|
||||||
name: host,
|
name: host,
|
||||||
host: addresses ? addresses[0] : '',
|
host: addresses ? addresses[0] : '',
|
||||||
port: port,
|
port: port,
|
||||||
addresses: addresses
|
addresses: addresses,
|
||||||
|
txt: text
|
||||||
});
|
});
|
||||||
if (this.devices.indexOf(host) === -1) {
|
if (this.devices.indexOf(host) === -1) {
|
||||||
this.devices.push(host);
|
this.devices.push(host);
|
||||||
|
@ -146,10 +147,11 @@ export default class RAOP {
|
||||||
|
|
||||||
browser.on('update', (service: any) => {
|
browser.on('update', (service: any) => {
|
||||||
if (service.addresses && service.fullname && service.fullname.includes('_raop._tcp')) {
|
if (service.addresses && service.fullname && service.fullname.includes('_raop._tcp')) {
|
||||||
|
console.log(service.txt)
|
||||||
this._win.webContents.executeJavaScript(`console.log(
|
this._win.webContents.executeJavaScript(`console.log(
|
||||||
"${service.name} ${service.host}:${service.port} ${service.addresses}"
|
"${service.name} ${service.host}:${service.port} ${service.addresses}"
|
||||||
)`);}
|
)`);
|
||||||
this.ondeviceup(service.name, service.host, service.port, service.addresses);
|
this.ondeviceup(service.name, service.host, service.port, service.addresses, service.txt);}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue