From 838028fcb021b0e38c7bae395dfdb3c451f727dc Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Tue, 12 Aug 2025 23:29:53 +0700 Subject: [PATCH] Add subscription parameters to stream detection for improved change tracking --- app.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app.py b/app.py index 09cb227..c9727e8 100644 --- a/app.py +++ b/app.py @@ -567,6 +567,10 @@ async def detect(websocket: WebSocket): "modelId": stream["modelId"], "modelName": stream["modelName"], "online": True, + # Include all subscription parameters for proper change detection + "rtspUrl": stream.get("rtsp_url"), + "snapshotUrl": stream.get("snapshot_url"), + "snapshotInterval": stream.get("snapshot_interval"), **{k: v for k, v in get_crop_coords(stream).items() if v is not None} } for camera_id, stream in streams.items() @@ -813,6 +817,10 @@ async def detect(websocket: WebSocket): "modelId": stream["modelId"], "modelName": stream["modelName"], "online": True, + # Include all subscription parameters for proper change detection + "rtspUrl": stream.get("rtsp_url"), + "snapshotUrl": stream.get("snapshot_url"), + "snapshotInterval": stream.get("snapshot_interval"), **{k: v for k, v in get_crop_coords(stream).items() if v is not None} } for camera_id, stream in streams.items()