From 7fc5a0673af78f7dd8858b7a4a27883c460f777a Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Wed, 12 Jul 2023 20:35:15 -0600 Subject: [PATCH] Clenanup --- frigate/models.py | 2 +- frigate/record/maintainer.py | 2 +- migrations/018_add_recording_audio.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frigate/models.py b/frigate/models.py index f90aa1769..179759430 100644 --- a/frigate/models.py +++ b/frigate/models.py @@ -66,7 +66,7 @@ class Recordings(Model): # type: ignore[misc] duration = FloatField() motion = IntegerField(null=True) objects = IntegerField(null=True) - audio = IntegerField(null=True) # audio events in this recording + audio = BooleanField(default=False) # audio events in this recording segment_size = FloatField(default=0) # this should be stored as MB diff --git a/frigate/record/maintainer.py b/frigate/record/maintainer.py index 4459eb285..23833bd01 100644 --- a/frigate/record/maintainer.py +++ b/frigate/record/maintainer.py @@ -342,7 +342,7 @@ class RecordingMaintainer(threading.Thread): motion=motion_count, # TODO: update this to store list of active objects at some point objects=active_count, - audio=1 if audio_event else 0, + audio=audio_event, segment_size=segment_size, ) except Exception as e: diff --git a/migrations/018_add_recording_audio.py b/migrations/018_add_recording_audio.py index 1d74deffd..12508597a 100644 --- a/migrations/018_add_recording_audio.py +++ b/migrations/018_add_recording_audio.py @@ -31,7 +31,7 @@ SQL = pw.SQL def migrate(migrator, database, fake=False, **kwargs): migrator.add_fields( Recordings, - audio=pw.IntegerField(null=True), + audio=pw.BooleanField(default=False), )