diff options
| author | Luke Hoersten <[email protected]> | 2026-06-14 10:57:01 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-06-14 10:57:01 -0500 |
| commit | 1ba5250c96644440226ad71922f40c7eaa4ef649 (patch) | |
| tree | 2e7b4262d1aa5528b224b6d8a176b7d19a91a986 /partitions.csv | |
| parent | 52f4105aa059b9d7310d80cfb86abe844f7be05a (diff) | |
scrypted/script: auto-populate viewport host via mDNS
The host field is now optional in "+ Add Device". The script tries
dns.promises.lookup("viewport-<name>.local") via the OS resolver
(Bonjour on macOS, nss-mdns on Linux, host networking on Docker) on:
- every registerViewport call (plugin start, child instantiation,
settings change, periodic 5-min refresh),
- right after createDevice so a fresh viewport's host field is
populated by the time the operator opens its settings page.
On a successful lookup that differs from the stored host, the
resolved IP is written back to the child's storage. POST /config and
POST /frame then use the resolved value.
Falls back gracefully to the operator-entered host (with a one-line
warning if both are empty). A per-viewport "Auto-resolve via mDNS"
toggle (default on) opts out — useful for cross-VLAN setups or hosts
where mDNS doesn't reach.
scrypted/README.md adds a "How mDNS auto-resolve works" section
covering the per-OS resolver requirements and the Docker host-
networking note.
Diffstat (limited to 'partitions.csv')
0 files changed, 0 insertions, 0 deletions
