mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 06:55:28 +03:00
Compare commits
1 Commits
ae5f79dcce
...
ac6a8cc3ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac6a8cc3ca |
@ -201,10 +201,9 @@ Each line represents a detection state, not necessarily unique individuals. The
|
|||||||
except json.JSONDecodeError as je:
|
except json.JSONDecodeError as je:
|
||||||
logger.error("Failed to parse review description JSON: %s", je)
|
logger.error("Failed to parse review description JSON: %s", je)
|
||||||
return None
|
return None
|
||||||
# observations and confidence are required on the model; fill an empty default
|
# observations is required on the model; fill an empty default
|
||||||
# if the response omitted it so attribute access stays safe.
|
# if the response omitted it so attribute access stays safe.
|
||||||
raw.setdefault("observations", [])
|
raw.setdefault("observations", [])
|
||||||
raw.setdefault("confidence", 0.0)
|
|
||||||
metadata = ReviewMetadata.model_construct(**raw)
|
metadata = ReviewMetadata.model_construct(**raw)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(
|
logger.error(
|
||||||
|
|||||||
@ -317,16 +317,16 @@ class CameraWatchdog(threading.Thread):
|
|||||||
if camera != self.config.name:
|
if camera != self.config.name:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if topic.endswith(RecordingsDataTypeEnum.invalid.value):
|
if topic.endswith(RecordingsDataTypeEnum.valid.value):
|
||||||
self.logger.warning(
|
|
||||||
f"Invalid recording segment detected for {camera} at {segment_time}"
|
|
||||||
)
|
|
||||||
self.latest_invalid_segment_time = segment_time
|
|
||||||
elif topic.endswith(RecordingsDataTypeEnum.valid.value):
|
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
f"Latest valid recording segment time on {camera}: {segment_time}"
|
f"Latest valid recording segment time on {camera}: {segment_time}"
|
||||||
)
|
)
|
||||||
self.latest_valid_segment_time = segment_time
|
self.latest_valid_segment_time = segment_time
|
||||||
|
elif topic.endswith(RecordingsDataTypeEnum.invalid.value):
|
||||||
|
self.logger.warning(
|
||||||
|
f"Invalid recording segment detected for {camera} at {segment_time}"
|
||||||
|
)
|
||||||
|
self.latest_invalid_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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user