This commit is contained in:
Nick Mowen 2023-07-12 20:35:15 -06:00
parent 0455097879
commit 7fc5a0673a
3 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ class Recordings(Model): # type: ignore[misc]
duration = FloatField() duration = FloatField()
motion = IntegerField(null=True) motion = IntegerField(null=True)
objects = 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 segment_size = FloatField(default=0) # this should be stored as MB

View File

@ -342,7 +342,7 @@ class RecordingMaintainer(threading.Thread):
motion=motion_count, motion=motion_count,
# TODO: update this to store list of active objects at some point # TODO: update this to store list of active objects at some point
objects=active_count, objects=active_count,
audio=1 if audio_event else 0, audio=audio_event,
segment_size=segment_size, segment_size=segment_size,
) )
except Exception as e: except Exception as e:

View File

@ -31,7 +31,7 @@ SQL = pw.SQL
def migrate(migrator, database, fake=False, **kwargs): def migrate(migrator, database, fake=False, **kwargs):
migrator.add_fields( migrator.add_fields(
Recordings, Recordings,
audio=pw.IntegerField(null=True), audio=pw.BooleanField(default=False),
) )