diff --git a/frigate/events.py b/frigate/events.py index 95ef002cd..4818e5594 100644 --- a/frigate/events.py +++ b/frigate/events.py @@ -110,7 +110,8 @@ class EventProcessor(threading.Thread): # if the earliest event is more tha max seconds ago, cap it earliest_event = max( - earliest_event, datetime.datetime.now().timestamp() - max_seconds + earliest_event, + datetime.datetime.now().timestamp() - self.config.clips.max_seconds, ) for f, data in list(self.cached_clips.items()): diff --git a/frigate/http.py b/frigate/http.py index 7630d2c05..8341c0dd4 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -53,7 +53,7 @@ class MqttBackend: json_message = json.loads(message) json_message = { "topic": f"{self.topic_prefix}/{json_message['topic']}", - "payload": json_message.get["payload"], + "payload": json_message["payload"], "retain": json_message.get("retain", False), } except: