mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-01 08:45:21 +03:00
Include thumbnail in final mqtt update
This commit is contained in:
parent
42410a260c
commit
8ac70cec67
@ -451,7 +451,7 @@ class TrackedObjectProcessor(threading.Thread):
|
|||||||
event_data = obj.to_dict(include_thumbnail=True)
|
event_data = obj.to_dict(include_thumbnail=True)
|
||||||
event_data['has_snapshot'] = False
|
event_data['has_snapshot'] = False
|
||||||
if not obj.false_positive:
|
if not obj.false_positive:
|
||||||
message = { 'before': obj.previous, 'after': obj.to_dict(), 'type': 'end' }
|
message = { 'before': obj.previous, 'after': event_data, 'type': 'end' }
|
||||||
self.client.publish(f"{self.topic_prefix}/events", json.dumps(message), retain=False)
|
self.client.publish(f"{self.topic_prefix}/events", json.dumps(message), retain=False)
|
||||||
# write snapshot to disk if enabled
|
# write snapshot to disk if enabled
|
||||||
if snapshot_config.enabled and self.should_save_snapshot(camera, obj):
|
if snapshot_config.enabled and self.should_save_snapshot(camera, obj):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user