some fix to cast discovery

This commit is contained in:
vapormusic 2022-08-05 21:03:04 +07:00
parent b779685387
commit d5add5071d
2 changed files with 2 additions and 2 deletions

View file

@ -89,7 +89,7 @@ export default class RAOP {
// console.log(this.castDevices.findIndex((item: any) => {return (item.name == host.replace(".local","") && item.port == port )}))
if (
this.castDevices.findIndex((item: any) => {
return item != null && item.name == (host ?? "Unknown").replace(".local", "") && item.port == port;
return item != null && item.name == (host ?? "Unknown").replace(".local", "") && item.port == port && (item.host == (addresses ? addresses[0] : ""));
}) == -1
) {
this.castDevices.push({