From 10aa9ac7f518d7fb040e83eb2e8c8dee66c04b6b Mon Sep 17 00:00:00 2001 From: SeydX Date: Sun, 24 Apr 2022 17:51:28 +0200 Subject: [PATCH] v1.1.17 --- CHANGELOG.md | 5 +++++ package-lock.json | 4 ++-- package.json | 2 +- src/controller/camera/services/prebuffer.service.js | 4 ++-- src/controller/camera/services/stream.service.js | 2 +- src/controller/camera/services/videoanalysis.service.js | 4 ++-- src/controller/event/event.controller.js | 8 +++++--- 7 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aedb2a23..006532ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog All notable changes to this project will be documented in this file. +# v1.1.7 - 2022-04-24 + +## Bugfixes +- Several issues that caused the process to crash have been fixed + # v1.1.16 - 2022-04-24 ## Notable Changes diff --git a/package-lock.json b/package-lock.json index c0375f31..404c76d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "camera.ui", - "version": "1.1.16", + "version": "1.1.17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "camera.ui", - "version": "1.1.16", + "version": "1.1.17", "funding": [ { "type": "paypal", diff --git a/package.json b/package.json index 3cd78635..40b6ec5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "camera.ui", - "version": "1.1.16", + "version": "1.1.17", "description": "NVR like user interface for RTSP capable cameras.", "author": "SeydX (https://github.com/SeydX/camera.ui)", "scripts": { diff --git a/src/controller/camera/services/prebuffer.service.js b/src/controller/camera/services/prebuffer.service.js index 4e046629..a979c84c 100644 --- a/src/controller/camera/services/prebuffer.service.js +++ b/src/controller/camera/services/prebuffer.service.js @@ -587,7 +587,7 @@ export default class PrebufferService { kill(); - Socket.io.emit.emit('prebufferStatus', { + Socket.io.emit('prebufferStatus', { camera: this.cameraName, status: 'inactive', }); @@ -600,7 +600,7 @@ export default class PrebufferService { await socketPromise; clearTimeout(ffmpegTimeout); - Socket.io.emit.emit('prebufferStatus', { + Socket.io.emit('prebufferStatus', { camera: this.cameraName, status: 'active', }); diff --git a/src/controller/camera/services/stream.service.js b/src/controller/camera/services/stream.service.js index f782c342..00167d36 100644 --- a/src/controller/camera/services/stream.service.js +++ b/src/controller/camera/services/stream.service.js @@ -153,7 +153,7 @@ export default class StreamService { let errors = []; this.streamSession.stdout.on('data', (data) => { - Socket.io.emit.to(`stream/${this.cameraName}`).emit(this.cameraName, data); + Socket.io.to(`stream/${this.cameraName}`).emit(this.cameraName, data); }); this.streamSession.stderr.on('data', (data) => { diff --git a/src/controller/camera/services/videoanalysis.service.js b/src/controller/camera/services/videoanalysis.service.js index 697937a3..2f30438d 100644 --- a/src/controller/camera/services/videoanalysis.service.js +++ b/src/controller/camera/services/videoanalysis.service.js @@ -315,7 +315,7 @@ export default class VideoAnalysisService { p2p.on('pam', () => { restartWatchdog(); - Socket.io.emit.emit('videoanalysisStatus', { + Socket.io.emit('videoanalysisStatus', { camera: this.cameraName, status: 'active', }); @@ -394,7 +394,7 @@ export default class VideoAnalysisService { log.debug('Videoanalysis process closed', this.cameraName); - Socket.io.emit.emit('videoanalysisStatus', { + Socket.io.emit('videoanalysisStatus', { camera: this.cameraName, status: 'inactive', }); diff --git a/src/controller/event/event.controller.js b/src/controller/event/event.controller.js index 2ebb5bfd..512a5292 100644 --- a/src/controller/event/event.controller.js +++ b/src/controller/event/event.controller.js @@ -149,15 +149,17 @@ export default class EventController { if (allowStream) { const diskSpace = Socket.diskSpace; - const allowRecording = Boolean(diskSpace.free >= 1); + const allowRecording = Boolean(diskSpace.available >= 1) || Boolean(diskSpace.available === null); if (!allowRecording) { log.warn( - `The available disk space is less than 1 GB (${diskSpace.free.toFixed( + `The available disk space is less than 1 GB (${diskSpace.available.toFixed( 2 - )})! Please free up disk space to be able to create new recordings!`, + )} GB)! Please free up disk space to be able to create new recordings!`, cameraName ); + + log.info('Skip local storage of the recording..', cameraName); } if (!fileBuffer) {