mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Catch case where user tries to end definite manual event (#12951)
* Catch case where user tries to end definite manual event * Formatting
This commit is contained in:
parent
9832831c5e
commit
3eaf9f4011
@ -503,8 +503,15 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
# temporarily make it so this event can not end
|
# temporarily make it so this event can not end
|
||||||
current_segment.last_update = sys.maxsize
|
current_segment.last_update = sys.maxsize
|
||||||
elif manual_info["state"] == ManualEventState.end:
|
elif manual_info["state"] == ManualEventState.end:
|
||||||
self.indefinite_events[camera].pop(manual_info["event_id"])
|
event_id = manual_info["event_id"]
|
||||||
|
|
||||||
|
if event_id in self.indefinite_events[camera]:
|
||||||
|
self.indefinite_events[camera].pop(event_id)
|
||||||
current_segment.last_update = manual_info["end_time"]
|
current_segment.last_update = manual_info["end_time"]
|
||||||
|
else:
|
||||||
|
logger.error(
|
||||||
|
f"Event with ID {event_id} has a set duration and can not be ended manually."
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
if topic == DetectionTypeEnum.video:
|
if topic == DetectionTypeEnum.video:
|
||||||
self.check_if_new_segment(
|
self.check_if_new_segment(
|
||||||
|
Loading…
Reference in New Issue
Block a user