fix filtered event starting record on monitor
parent
a75fb21f46
commit
cde8b7b0bd
|
|
@ -3728,27 +3728,6 @@ module.exports = function(s,config,lang){
|
|||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
hidden: true,
|
||||
"name": lang['OpenCV Cascades'],
|
||||
"color": "orange",
|
||||
id: "monSectionOpenCVCascades",
|
||||
headerTitle: `${lang['OpenCV Cascades']}<a class="pull-right btn btn-xs btn-default refresh_cascades" title="${lang['Refresh List of Cascades']}"> <i class="fa fa-retweet"></i> </a>`,
|
||||
blockquote: lang.opencvCascadesText,
|
||||
isSection: true,
|
||||
isAdvanced: true,
|
||||
isFormGroupGroup: true,
|
||||
"section-pre-pre-class": "h_det_input h_det_1",
|
||||
"section-pre-class": "h_casc_input h_casc_1",
|
||||
"section-class": "shinobi-detector-opencv shinobi-detector-openalpr shinobi-detector_plug",
|
||||
"info": [
|
||||
{
|
||||
"fieldType": "div",
|
||||
id: "detector_cascade_list",
|
||||
style: "max-height: 300px;overflow: auto;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
hidden: true,
|
||||
"name": lang['Traditional Recording'],
|
||||
|
|
@ -6307,6 +6286,23 @@ module.exports = function(s,config,lang){
|
|||
hidden:true,
|
||||
"name": "id",
|
||||
},
|
||||
{
|
||||
"name": "enabled",
|
||||
"field": lang.Enabled,
|
||||
"fieldType": "select",
|
||||
"default": "1",
|
||||
"possible": [
|
||||
{
|
||||
"name": "No",
|
||||
"value": "0",
|
||||
},
|
||||
{
|
||||
"name": "Yes",
|
||||
"value": "1",
|
||||
"selected": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "filter_name",
|
||||
"field": lang['Filter Name'],
|
||||
|
|
@ -6346,7 +6342,7 @@ module.exports = function(s,config,lang){
|
|||
"fieldType": "select",
|
||||
"form-group-class": "actions-row",
|
||||
"description": "Make the event do nothing, as if it never happened.",
|
||||
"default": "No",
|
||||
"default": "0",
|
||||
"possible": [
|
||||
{
|
||||
"name": "No",
|
||||
|
|
@ -7553,7 +7549,7 @@ module.exports = function(s,config,lang){
|
|||
},
|
||||
"Monitor Options": {
|
||||
"section": "Monitor Options",
|
||||
"dropdownClass": `dropdown-menu-dark ${mainBackgroundColor}`
|
||||
"dropdownClass": `${Theme.isDark ? 'dropdown-menu-dark' : ''} ${mainBackgroundColor}`
|
||||
},
|
||||
"SideMenu": {
|
||||
"section": "SideMenu",
|
||||
|
|
@ -7767,7 +7763,7 @@ module.exports = function(s,config,lang){
|
|||
"divContent": `<div class="card-body ${textWhiteOnBgDark}">
|
||||
<h5 class="card-title"><i class="fa fa-th text-muted"></i> ${lang['Live Grid']}</h5>
|
||||
<p class="card-text">${lang.liveGridDescription}</p>
|
||||
<a href="#" page-open="liveGrid" class="btn btn-primary">${lang.Open}</a>
|
||||
<a page-open="liveGrid" class="btn btn-primary">${lang.Open}</a>
|
||||
</div>`
|
||||
},
|
||||
{
|
||||
|
|
@ -7776,7 +7772,7 @@ module.exports = function(s,config,lang){
|
|||
"divContent": `<div class="card-body ${textWhiteOnBgDark}">
|
||||
<h5 class="card-title"><i class="fa fa-gears text-muted"></i> ${lang['Account Settings']}</h5>
|
||||
<p class="card-text">${lang.accountSettingsDescription}</p>
|
||||
<a href="#" page-open="accountSettings" class="btn btn-primary">${lang.Open}</a>
|
||||
<a page-open="accountSettings" class="btn btn-primary">${lang.Open}</a>
|
||||
</div>`
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ module.exports = (s,config,lang,app,io) => {
|
|||
Object.keys(filters).forEach(function(key){
|
||||
var conditionChain = {}
|
||||
var dFilter = filters[key]
|
||||
if(dFilter.enabled === '0')return;
|
||||
dFilter.where.forEach(function(condition,place){
|
||||
conditionChain[place] = {ok:false,next:condition.p4,matrixCount:0}
|
||||
if(d.details.matrices)conditionChain[place].matrixCount = d.details.matrices.length
|
||||
|
|
@ -268,6 +269,9 @@ module.exports = (s,config,lang,app,io) => {
|
|||
var value = dFilter.actions[key]
|
||||
filter[key] = parseValue(key,value)
|
||||
})
|
||||
if(dFilter.actions.record === '1'){
|
||||
filter.forceRecord = true
|
||||
}
|
||||
}else{
|
||||
filter.halt = true
|
||||
}
|
||||
|
|
@ -381,9 +385,8 @@ module.exports = (s,config,lang,app,io) => {
|
|||
detector_timeout = parseFloat(monitorDetails.detector_timeout)
|
||||
}
|
||||
if(
|
||||
filter.record &&
|
||||
(filter.forceRecord || (filter.record && monitorDetails.detector_trigger === '1')) &&
|
||||
monitorConfig.mode === 'start' &&
|
||||
monitorDetails.detector_trigger === '1' &&
|
||||
(monitorDetails.detector_record_method === 'sip' || monitorDetails.detector_record_method === 'hot')
|
||||
){
|
||||
createEventBasedRecording(d,moment(eventTime).subtract(5,'seconds').format('YYYY-MM-DDTHH-mm-ss'))
|
||||
|
|
@ -595,6 +598,7 @@ module.exports = (s,config,lang,app,io) => {
|
|||
webhook : true,
|
||||
command : true,
|
||||
record : true,
|
||||
forceRecord : false,
|
||||
indifference : false,
|
||||
countObjects : true
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue