mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-14 17:16:42 +03:00
Fix trigger sync (#21264)
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
- don't look for event ids when trigger type is description - don't try to delete thumbnail whe trigger type is description - pass correct event ID into thumbnail deletion
This commit is contained in:
parent
af7af33645
commit
430cebecda
@ -498,9 +498,12 @@ class Embeddings:
|
|||||||
|
|
||||||
if needs_embedding_update:
|
if needs_embedding_update:
|
||||||
existing_trigger.save()
|
existing_trigger.save()
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
# Create new trigger
|
# Create new trigger
|
||||||
try:
|
try:
|
||||||
|
# For thumbnail triggers, validate the event exists
|
||||||
|
if trigger.type == "thumbnail":
|
||||||
try:
|
try:
|
||||||
event: Event = Event.get(Event.id == trigger.data)
|
event: Event = Event.get(Event.id == trigger.data)
|
||||||
except DoesNotExist:
|
except DoesNotExist:
|
||||||
@ -557,7 +560,11 @@ class Embeddings:
|
|||||||
Trigger.camera == camera.name, Trigger.name.in_(triggers_to_remove)
|
Trigger.camera == camera.name, Trigger.name.in_(triggers_to_remove)
|
||||||
).execute()
|
).execute()
|
||||||
for trigger_name in triggers_to_remove:
|
for trigger_name in triggers_to_remove:
|
||||||
self.remove_trigger_thumbnail(camera.name, trigger_name)
|
# Only remove thumbnail files for thumbnail triggers
|
||||||
|
if existing_triggers[trigger_name].type == "thumbnail":
|
||||||
|
self.remove_trigger_thumbnail(
|
||||||
|
camera.name, existing_triggers[trigger_name].data
|
||||||
|
)
|
||||||
|
|
||||||
def write_trigger_thumbnail(
|
def write_trigger_thumbnail(
|
||||||
self, camera: str, event_id: str, thumbnail: bytes
|
self, camera: str, event_id: str, thumbnail: bytes
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user