fix invalid recording segment topic being misrouted to the valid handler

This commit is contained in:
Josh Hawkins 2026-04-28 09:07:07 -05:00
parent b0f4fcd676
commit 87501ba970

View File

@ -317,16 +317,16 @@ class CameraWatchdog(threading.Thread):
if camera != self.config.name: if camera != self.config.name:
continue continue
if topic.endswith(RecordingsDataTypeEnum.valid.value): if topic.endswith(RecordingsDataTypeEnum.invalid.value):
self.logger.debug(
f"Latest valid recording segment time on {camera}: {segment_time}"
)
self.latest_valid_segment_time = segment_time
elif topic.endswith(RecordingsDataTypeEnum.invalid.value):
self.logger.warning( self.logger.warning(
f"Invalid recording segment detected for {camera} at {segment_time}" f"Invalid recording segment detected for {camera} at {segment_time}"
) )
self.latest_invalid_segment_time = segment_time self.latest_invalid_segment_time = segment_time
elif topic.endswith(RecordingsDataTypeEnum.valid.value):
self.logger.debug(
f"Latest valid recording segment time on {camera}: {segment_time}"
)
self.latest_valid_segment_time = segment_time
elif topic.endswith(RecordingsDataTypeEnum.latest.value): elif topic.endswith(RecordingsDataTypeEnum.latest.value):
if segment_time is not None: if segment_time is not None:
self.latest_cache_segment_time = segment_time self.latest_cache_segment_time = segment_time