some cleanup

This commit is contained in:
vapormusic 2022-05-01 22:02:56 +07:00
parent 95e3cab7a5
commit 59f0cd7ee2

View file

@ -89,9 +89,9 @@ export default class RAOP {
`; `;
private ondeviceup(name: any, host: any, port: any, addresses: any, text: 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.replace(".local","") && item.port == port && item.addresses == addresses) === -1) {
this.castDevices.push({ this.castDevices.push({
name: host, name: host.replace(".local",""),
host: addresses ? addresses[0] : '', host: addresses ? addresses[0] : '',
port: port, port: port,
addresses: addresses, addresses: addresses,