diff options
| author | Luke Hoersten <[email protected]> | 2026-06-21 11:40:02 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-06-21 11:40:02 -0500 |
| commit | f6d8e75c9c2e12b1527dc0a5464b576c4b94640b (patch) | |
| tree | e3089c5d9c6105c6f02b1e76d56b754d3c290df2 /.gitignore | |
| parent | 6534ff5507b70d968ae8bfdc517ea1fc22173109 (diff) | |
scrypted: override parent device type to Bridge (was hardcoded Unknown by Scripts plugin)
The 'Unknown' text the user saw above the Status and Controls panel
is the device TYPE, not the lifecycle state. Scripts plugin
(plugins/core/src/script.ts:65) hardcodes type=ScryptedDeviceType.Unknown
when it registers any script device, regardless of what interfaces
the loaded class actually implements.
Override it from inside the script: call deviceManager.onDeviceDiscovered
ourselves with type=Bridge, which semantically fits our DeviceProvider
that bridges multiple child viewport devices. The override runs after
Scripts plugin's postRunScript-driven discovery so the later call wins.
Pass the full interface set explicitly (auto-detection found from
method names: Settings/DeviceProvider/DeviceCreator/HttpRequestHandler/
StartStop, plus Scripts base Scriptable+Program) — partial lists drop
interfaces.
The override is wrapped in try/catch — if the device record's
provider mapping changes in a future Scrypted version, we degrade
to the old Unknown label rather than the script failing to boot.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions
