Skip to content

Commit 2f31a36

Browse files
committed
fix for possible bad logic when implementing MINIMUM_SECONDS_TO_INCLUDE_PLAYBACK env
1 parent 424266b commit 2f31a36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/tasks/ActivityMonitor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ async function ActivityMonitor(interval) {
181181
let ExistingDataToUpdate = [];
182182

183183
//for each item in playbackToInsert, check if it exists in the recent playback activity and update accordingly. insert new row if updating existing exceeds the runtime
184-
if (playbackToInsert.length >= MINIMUM_SECONDS_TO_INCLUDE_PLAYBACK && ExistingRecords.length >= MINIMUM_SECONDS_TO_INCLUDE_PLAYBACK) {
184+
if (playbackToInsert.length >0 && ExistingRecords.length >0) {
185185
ExistingDataToUpdate = playbackToInsert.filter((playbackData) => {
186186
const existingrow = ExistingRecords.find((existing) => {
187187
let newDurationWithingRunTime = true;

0 commit comments

Comments
 (0)