Merge branch 'dev' into 'master'
Tiny Fixes See merge request Shinobi-Systems/Shinobi!41merge-requests/48/head
commit
3301972884
|
@ -326,7 +326,7 @@ module.exports = function(s,config,lang){
|
|||
}else{
|
||||
detector_timeout = parseFloat(currentConfig.detector_timeout)
|
||||
}
|
||||
if(currentConfig.watchdog_reset !== '1' || !s.group[d.ke].mon[d.id].eventBasedRecording.timeout){
|
||||
if(currentConfig.watchdog_reset === '1' || !s.group[d.ke].mon[d.id].eventBasedRecording.timeout){
|
||||
clearTimeout(s.group[d.ke].mon[d.id].eventBasedRecording.timeout)
|
||||
s.group[d.ke].mon[d.id].eventBasedRecording.timeout = setTimeout(function(){
|
||||
s.group[d.ke].mon[d.id].eventBasedRecording.allowEnd = true
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
module.exports = function(s,config){
|
||||
////// USER //////
|
||||
s.onSocketAuthenticationExtensions = []
|
||||
s.onSocketAuthentication = function(callback){
|
||||
s.onSocketAuthenticationExtensions.push(callback)
|
||||
}
|
||||
//
|
||||
s.loadGroupAppExtensions = []
|
||||
s.loadGroupAppExtender = function(callback){
|
||||
s.loadGroupAppExtensions.push(callback)
|
||||
|
@ -51,8 +56,15 @@ module.exports = function(s,config){
|
|||
s.onMonitorInit = function(callback){
|
||||
s.onMonitorInitExtensions.push(callback)
|
||||
}
|
||||
//
|
||||
s.onDetectorNoTriggerTimeoutExtensions = []
|
||||
s.onDetectorNoTriggerTimeout = function(callback){
|
||||
s.onDetectorNoTriggerTimeoutExtensions.push(callback)
|
||||
}
|
||||
//
|
||||
s.onFfmpegCameraStringCreationExtensions = []
|
||||
s.onFfmpegCameraStringCreation = function(callback){
|
||||
s.onFfmpegCameraStringCreationExtensions.push(callback)
|
||||
}
|
||||
//
|
||||
}
|
||||
|
|
|
@ -884,6 +884,9 @@ module.exports = function(s,config,onFinish){
|
|||
ffmpeg.buildMainStream(e,x)
|
||||
ffmpeg.buildMainRecording(e,x)
|
||||
ffmpeg.buildMainDetector(e,x)
|
||||
s.onFfmpegCameraStringCreationExtensions.forEach(function(extender){
|
||||
extender(e,x)
|
||||
})
|
||||
ffmpeg.assembleMainPieces(e,x)
|
||||
ffmpeg.createPipeArray(e,x)
|
||||
//hold ffmpeg command for log stream
|
||||
|
@ -895,9 +898,9 @@ module.exports = function(s,config,onFinish){
|
|||
}
|
||||
if(!config.ffmpegDir){
|
||||
ffmpeg.checkForWindows(function(){
|
||||
ffmpeg.checkForUnix(function(){
|
||||
ffmpeg.checkForFfbinary(function(){
|
||||
ffmpeg.checkForNpmStatic(function(){
|
||||
ffmpeg.checkForUnix(function(){
|
||||
console.log('No FFmpeg found.')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -477,6 +477,9 @@ module.exports = function(s,config,lang,io){
|
|||
console.log(err)
|
||||
}
|
||||
})
|
||||
s.onSocketAuthenticationExtensions.forEach(function(extender){
|
||||
extender(r,cn)
|
||||
})
|
||||
}
|
||||
s.sqlQuery('SELECT ke,uid,auth,mail,details FROM Users WHERE ke=? AND auth=? AND uid=?',[d.ke,d.auth,d.uid],function(err,r) {
|
||||
if(r&&r[0]){
|
||||
|
|
|
@ -230,11 +230,6 @@ module.exports = function(s,config,lang){
|
|||
})
|
||||
})
|
||||
})
|
||||
fs.chmod(videoSnap,0o777,function(err){
|
||||
if(!err){
|
||||
fs.unlink(videoSnap,function(err){})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
console.log(new Error())
|
||||
console.log(lang['Database row does not exist'],queryValues)
|
||||
|
|
Loading…
Reference in New Issue