From 36804de39142ddd3ce439750edf11410d5dea1bf Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 26 Sep 2025 16:59:55 -0500 Subject: [PATCH] listen to correct topic in embeddings maintainer --- frigate/embeddings/maintainer.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/frigate/embeddings/maintainer.py b/frigate/embeddings/maintainer.py index a129b9677..7cfbf5333 100644 --- a/frigate/embeddings/maintainer.py +++ b/frigate/embeddings/maintainer.py @@ -524,20 +524,30 @@ class EmbeddingMaintainer(threading.Thread): def _process_recordings_updates(self) -> None: """Process recordings updates.""" while True: - recordings_data = self.recordings_subscriber.check_for_update() + update = self.recordings_subscriber.check_for_update() - if recordings_data == None: + if not update: break - camera, recordings_available_through_timestamp = recordings_data + (raw_topic, payload) = update - self.recordings_available_through[camera] = ( - recordings_available_through_timestamp - ) + if not raw_topic or not payload: + break - logger.debug( - f"{camera} now has recordings available through {recordings_available_through_timestamp}" - ) + topic = str(raw_topic) + + if topic.endswith( + RecordingsDataTypeEnum.recordings_available_through.value + ): + camera, recordings_available_through_timestamp = payload + + self.recordings_available_through[camera] = ( + recordings_available_through_timestamp + ) + + logger.debug( + f"{camera} now has recordings available through {recordings_available_through_timestamp}" + ) def _process_review_updates(self) -> None: """Process review updates."""