SDK 的 Bug 修复

This commit is contained in:
2026-01-17 00:03:16 +08:00
parent 97a322960a
commit 2a331d769f
10 changed files with 131 additions and 38 deletions

View File

@@ -42,7 +42,7 @@ public class CamerasController : ControllerBase
d.RealFps,
d.TotalFrames,
d.IsPhysicalOnline,
d.IsOnline,
d.IsActived,
d.IsRunning,
d.Width,
d.Height,
@@ -532,7 +532,7 @@ public class CamerasController : ControllerBase
if (device == null) return NotFound(new { error = "Device not found" });
// 依然是两道防线:先检查在线,再检查能力
if (!device.IsOnline) return BadRequest(new { error = "Device is offline" });
if (!device.IsActived) return BadRequest(new { error = "Device is offline" });
if (device is IRebootFeature rebootFeature)
{
@@ -559,7 +559,7 @@ public class CamerasController : ControllerBase
{
var device = _manager.GetDevice(id);
if (device == null) return NotFound();
if (!device.IsOnline) return BadRequest("Device offline");
if (!device.IsActived) return BadRequest("Device offline");
if (device is IPtzFeature ptz)
{

View File

@@ -76,7 +76,7 @@ public class MonitorController : ControllerBase
{
d.Id,
Status = d.Status.ToString(),
d.IsOnline,
d.IsActived,
d.IsPhysicalOnline,
d.RealFps,
d.Width,