fix: 向导设备信息不再依赖Online标志,直接查询agent

This commit is contained in:
tian 2026-07-25 12:37:09 +08:00
parent 7120805c0c
commit 109269f2e0
2 changed files with 2 additions and 5 deletions

View File

@ -1491,15 +1491,12 @@ func (u *UI) apiWizardDeviceInfo(w http.ResponseWriter, r *http.Request) {
"name": dev.DisplayName(),
}
if u.agent != nil && dev.Online {
// Channels: use management DB for friendly names and RTSP URLs
if u.agent != nil {
// Always attempt to query agent - Online flag may be stale
channels := queryDeviceChannelsFromDB(u.preview, deviceID)
resp["channels"] = channels
caps := queryAgentCapabilities(u.agent, dev)
resp["capabilities"] = caps
// Include currently enabled features from management DB
if u.preview != nil {
if enabled, err := u.preview.GetDeviceFeatures(deviceID); err == nil {
resp["enabled_features"] = enabled

Binary file not shown.