[修复] MotionNotifier 补回 camera_ids 属性 - 避免重新开启轮询时 _fetch_events 引用缺失属性崩溃
This commit is contained in:
@@ -61,6 +61,8 @@ class MotionNotifier:
|
||||
self.timeout = int(cfg.get('timeout_sec', 10))
|
||||
# 是否启用轮询:用户要求不轮询,改由 SS Webhook 推送(默认关闭)
|
||||
self.poll_enabled = bool(cfg.get('poll_enabled', False))
|
||||
# 轮询路径(poll_enabled=true 时)关注的摄像头;Webhook 路径用摄像头名映射
|
||||
self.camera_ids = cfg.get('camera_ids', [2])
|
||||
# 摄像头名 -> camera_id 静态映射(优先),启动时再从 SS 拉一份补全
|
||||
self.camera_name_to_id = {
|
||||
str(k): int(v) for k, v in (cfg.get('camera_name_to_id') or {}).items()
|
||||
|
||||
Reference in New Issue
Block a user