mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-30 10:37:42 +03:00
Fix review creation
This commit is contained in:
parent
0cde4793c2
commit
9a667f18ba
@ -27,8 +27,6 @@ class ReviewDescriptionProcessor(PostProcessorApi):
|
|||||||
if data_type != PostProcessDataEnum.review:
|
if data_type != PostProcessDataEnum.review:
|
||||||
return
|
return
|
||||||
|
|
||||||
logger.info(f"processing review {data['type']} on {data['after']['camera']}")
|
|
||||||
|
|
||||||
id = data["after"]["id"]
|
id = data["after"]["id"]
|
||||||
|
|
||||||
if data["type"] == "new" or data["type"] == "update":
|
if data["type"] == "new" or data["type"] == "update":
|
||||||
@ -79,13 +77,13 @@ class ReviewDescriptionProcessor(PostProcessorApi):
|
|||||||
camera = final_data["camera"]
|
camera = final_data["camera"]
|
||||||
|
|
||||||
if (
|
if (
|
||||||
data["type"] == "alert"
|
final_data["severity"] == "alert"
|
||||||
and not self.config.cameras[camera].review.genai.alerts
|
and not self.config.cameras[camera].review.genai.alerts
|
||||||
):
|
):
|
||||||
self.tracked_review_items.pop(id)
|
self.tracked_review_items.pop(id)
|
||||||
return
|
return
|
||||||
elif (
|
elif (
|
||||||
data["type"] == "detection"
|
final_data["severity"] == "detection"
|
||||||
and not self.config.cameras[camera].review.detections
|
and not self.config.cameras[camera].review.detections
|
||||||
):
|
):
|
||||||
self.tracked_review_items.pop(id)
|
self.tracked_review_items.pop(id)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user