mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 22:57:40 +03:00
JPG snapshot should not be treated as clean
This commit is contained in:
parent
36fe0fa63d
commit
5cb5032d0a
@ -37,10 +37,6 @@ def get_event_snapshot(event: Event) -> ndarray | None:
|
|||||||
return image
|
return image
|
||||||
|
|
||||||
|
|
||||||
def _event_snapshot_is_clean(event: Event) -> bool:
|
|
||||||
return bool(event.data and event.data.get("snapshot_clean"))
|
|
||||||
|
|
||||||
|
|
||||||
def get_event_snapshot_path(
|
def get_event_snapshot_path(
|
||||||
event: Event, *, clean_only: bool = False
|
event: Event, *, clean_only: bool = False
|
||||||
) -> tuple[str | None, bool]:
|
) -> tuple[str | None, bool]:
|
||||||
@ -57,11 +53,12 @@ def get_event_snapshot_path(
|
|||||||
if not os.path.exists(snapshot_path):
|
if not os.path.exists(snapshot_path):
|
||||||
return None, False
|
return None, False
|
||||||
|
|
||||||
is_clean_snapshot = _event_snapshot_is_clean(event)
|
# Legacy JPG snapshots may already include overlays, so they should never
|
||||||
if clean_only and not is_clean_snapshot:
|
# be treated as clean input for additional rendering.
|
||||||
|
if clean_only:
|
||||||
return None, False
|
return None, False
|
||||||
|
|
||||||
return snapshot_path, is_clean_snapshot
|
return snapshot_path, False
|
||||||
|
|
||||||
|
|
||||||
def load_event_snapshot_image(
|
def load_event_snapshot_image(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user