Skip to content

Commit

Permalink
fix: use ip addresses instead of hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Aug 12, 2023
1 parent e5f56f7 commit c14e702
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/Service/BonjourDiscovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ class ServiceBonjourDiscovery extends ServiceBase {
// type: svc.type,
// protocol: svc.protocol,
// txt: svc.txt,
host: svc.host,
// addresses: svc.addresses,
// host: svc.host,
addresses: svc.addresses,
}
}

Expand Down
12 changes: 7 additions & 5 deletions webui/src/Components/BonjourDeviceInputField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ export function BonjourDeviceInputField({ value, setValue, connectionId, queryId
choices.push({ id: null, label: 'Manual' })

for (const svc of Object.values(services)) {
const address = `${svc.host}:${svc.port}`
choices.push({
id: address,
label: `${svc.name} (${address})`,
})
for (const rawAddress of svc.addresses || []) {
const address = `${rawAddress}:${svc.port}`
choices.push({
id: address,
label: `${svc.name} (${address})`,
})
}
}

return choices
Expand Down

0 comments on commit c14e702

Please sign in to comment.