From af914b4150e96d8b65b70f5ef2940ff7896c8d2a Mon Sep 17 00:00:00 2001 From: Ian Rubado Date: Wed, 15 Mar 2023 19:50:57 -0400 Subject: [PATCH 1/2] New config option to drop timelapse frames --- libs/timelapse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/timelapse.js b/libs/timelapse.js index 5e72be1f..d556d854 100644 --- a/libs/timelapse.js +++ b/libs/timelapse.js @@ -49,7 +49,7 @@ module.exports = function(s,config,lang,app,io){ size: fileStats.size, time: timeNow } - if(config.childNodes.enabled === true && config.childNodes.mode === 'child' && config.childNodes.host){ + if(config.childNodes.enabled === true && config.childNodes.mode === 'child' && config.childNodes.host && config.dropTimeLapseFrames === false){ var currentDate = s.formattedTime(timeNow,'YYYY-MM-DD') const childNodeData = { ke: e.ke, @@ -60,7 +60,7 @@ module.exports = function(s,config,lang,app,io){ queryInfo: queryInfo } sendTimelapseFrameToMasterNode(filePath,childNodeData) - }else{ + }else if (config.dropTimeLapseFrames === false ){ s.insertTimelapseFrameDatabaseRow(e,queryInfo,filePath) } } From ac5305c2b56b8f392c2f214e85c48060c1f7948f Mon Sep 17 00:00:00 2001 From: Ian Rubado Date: Wed, 15 Mar 2023 22:18:06 -0400 Subject: [PATCH 2/2] Fixed boolean logic --- libs/timelapse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/timelapse.js b/libs/timelapse.js index d556d854..205dd81b 100644 --- a/libs/timelapse.js +++ b/libs/timelapse.js @@ -49,7 +49,7 @@ module.exports = function(s,config,lang,app,io){ size: fileStats.size, time: timeNow } - if(config.childNodes.enabled === true && config.childNodes.mode === 'child' && config.childNodes.host && config.dropTimeLapseFrames === false){ + if(config.childNodes.enabled === true && config.childNodes.mode === 'child' && config.childNodes.host && config.dropTimeLapseFrames != true){ var currentDate = s.formattedTime(timeNow,'YYYY-MM-DD') const childNodeData = { ke: e.ke, @@ -60,7 +60,7 @@ module.exports = function(s,config,lang,app,io){ queryInfo: queryInfo } sendTimelapseFrameToMasterNode(filePath,childNodeData) - }else if (config.dropTimeLapseFrames === false ){ + }else if (config.dropTimeLapseFrames != true ){ s.insertTimelapseFrameDatabaseRow(e,queryInfo,filePath) } }