aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-02-14 16:34:26 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-02-14 16:34:26 +0300
commit9f0187c307f83a9f2fba85ac58397a2a89aab86b (patch)
treebad0a202176f495c087467058a648002c9f23a66
parent5cd9f89e2ddccb6a7960cae295517312a83f7308 (diff)
ipcam_server: upd
-rwxr-xr-xsrc/ipcam_server.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ipcam_server.py b/src/ipcam_server.py
index 858bd2f..077dba6 100755
--- a/src/ipcam_server.py
+++ b/src/ipcam_server.py
@@ -101,11 +101,12 @@ class IPCamServerDatabase(SQLiteBase):
cur = self.cursor()
data = {}
- cur.execute("SELECT camera, fix_time, motion_time FROM timestamps")
- for cam, fix_time, motion_time in cur.fetchall():
+ cur.execute("SELECT camera, fix_time, motion_time, motion_start_time FROM timestamps")
+ for cam, fix_time, motion_time, motion_start_time in cur.fetchall():
data[int(cam)] = {
'fix': int(fix_time),
- 'motion': int(motion_time)
+ 'motion': int(motion_time),
+ 'motion_start': int(motion_start_time)
}
return data