fix blank "objects" leaving extra commas in video rows

super-timeline
Moe 2023-08-01 18:00:29 -07:00
parent 598b3079f9
commit 2e71e3c23a
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ module.exports = function(s,config,lang){
k.details = k.details && k.details instanceof Object ? k.details : {}
var listOEvents = activeMonitor.detector_motion_count || []
var listOTags = listOEvents.filter(row => row.details.reason === 'object').map(row => row.details.matrices.map(matrix => matrix.tag).join(',')).join(',').split(',')
if(listOTags && !k.objects)k.objects = [...new Set(listOTags)].join(',');
if(listOTags && !k.objects)k.objects = [...new Set(listOTags)].filter(item => !!item).join(',');
k.filename = k.filename || k.file
k.ext = k.ext || e.ext || k.filename.split('.')[1]
k.stat = fs.statSync(k.dir+k.file)