minor cleanup

dynamic-substream
Moe 2021-09-13 08:03:35 -07:00
parent f0c00b3def
commit a7c168a73d
3 changed files with 1 additions and 4 deletions

View File

@ -29,7 +29,7 @@ module.exports = function(s,config,lang,app,io){
Object.keys(options).forEach((key) => {
const value = options[key]
if(typeof value === 'string'){
newOptions[key] = value.replace(/__CURRENT_TOKEN/g,Camera.current_profile.token)
newOptions[key] = value.replace(/__CURRENT_TOKEN/g,Camera.current_profile ? Camera.current_profile.token : 'NOTOKEN')
}else if(value !== undefined && value !== null){
newOptions[key] = value
}

View File

@ -84,7 +84,6 @@ module.exports = function(s,config,lang,app,io){
plug: "dropInEvent",
reason: reason
},
doObjectDetection: (s.isAtleatOneDetectorPluginConnected && s.group[ke].rawMonitorConfigurations[mid].details.detector_use_detect_object === '1')
},config.dropInEventForceSaveEvent)
}
if(search(filename,'.txt')){
@ -310,7 +309,6 @@ module.exports = function(s,config,lang,app,io){
plug: "dropInEvent",
reason: reasonTag
},
doObjectDetection: (s.isAtleatOneDetectorPluginConnected && details.detector_use_detect_object === '1')
},config.dropInEventForceSaveEvent)
callback()
})

View File

@ -1354,7 +1354,6 @@ module.exports = function(s,config,lang,app,io){
}
break;
}
d.doObjectDetection = (!d.details.matrices || d.details.matrices.length === 0) && (s.isAtleatOneDetectorPluginConnected && details.detector_use_detect_object === '1')
triggerEvent(d)
s.closeJsonResponse(res,{
ok: true,