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({

View file

@ -55,7 +55,7 @@
</div>
<div class="md-option-segment_auto"
style="display: flex;justify-content: center;align-items: center"
v-if="activeCasts.includes(device)">
v-if="activeCasts.some(item => { return item.host == device.host && item.name == device.name && item.port == device.port})">
Connected
</div>
<div class="md-option-segment_auto" v-else