fix SQLite Power Video bug
- newly created events will only be fixed. Previous events will unfortunately remain broken. MariaDB/MySQL databases are unafftected.merge-requests/63/head
parent
d1e9aac26c
commit
a901bd2e32
|
|
@ -254,7 +254,7 @@ module.exports = function(s,config,lang){
|
|||
}
|
||||
//save this detection result in SQL, only coords. not image.
|
||||
if(filter.save && currentConfig.detector_save === '1'){
|
||||
s.sqlQuery('INSERT INTO Events (ke,mid,details) VALUES (?,?,?)',[d.ke,d.id,detailString])
|
||||
s.sqlQuery('INSERT INTO Events (ke,mid,details,time) VALUES (?,?,?,?)',[d.ke,d.id,detailString,new Date()])
|
||||
}
|
||||
if(currentConfig.detector_notrigger === '1'){
|
||||
var detector_notrigger_timeout
|
||||
|
|
|
|||
|
|
@ -652,10 +652,12 @@ $.ccio.globalWebsocket=function(d,user){
|
|||
var newSetOfEventsWithoutChecked = {};
|
||||
var eventTime
|
||||
$.each(eventsToCheck,function(n,v){
|
||||
if(v.time.indexOf('T') > -1){
|
||||
eventTime = v.time.split('T');
|
||||
if(typeof v.time === 'string' && v.time.indexOf('T') > -1){
|
||||
eventTime = v.time.split('T')
|
||||
}else if(typeof v.time === 'number'){
|
||||
eventTime = moment(v.time).format('YYYY-MM-DD HH:mm:ss').split(' ')
|
||||
}else{
|
||||
eventTime = v.time.split(' ');
|
||||
eventTime = v.time.split(' ')
|
||||
}
|
||||
eventTime[1] = eventTime[1].replace(/-/g,':'),eventTime = eventTime.join(' ');
|
||||
if(eventTime === startTimeFormatted){
|
||||
|
|
|
|||
Loading…
Reference in New Issue