Skip to content

Commit

Permalink
Fixed broken startup
Browse files Browse the repository at this point in the history
  • Loading branch information
beele committed Sep 20, 2020
1 parent c81ce76 commit ec933b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/streaming/unifi-streaming-delegate.ts
Expand Up @@ -75,6 +75,7 @@ export class UnifiStreamingDelegate implements CameraStreamingDelegate {
this.ongoingSessions = {};
this.pendingSessions = {};
this.videoProcessor = videoProcessor || ffmpegPath || "ffmpeg";
log.info('VIDEO PROCESSOR: ' + this.videoProcessor);

this.cameraConfig = cameraConfig;

Expand Down
4 changes: 1 addition & 3 deletions src/unifi-protect-motion-platform.ts
Expand Up @@ -31,16 +31,14 @@ export class UnifiProtectMotionPlatform implements DynamicPlatformPlugin {
private uFlows: UnifiFlows;

constructor(private readonly log: Logging, private readonly config: PlatformConfig, private readonly api: API) {
if (!config || !this.config.unifi || !this.config.videoConfig) {
if (!config || !this.config.unifi) {
this.log.info('Incorrect plugin configuration!');
return;
}

//Set config defaults
(this.config.unifi as UnifiConfig).excluded_cameras = (this.config.unifi as UnifiConfig).excluded_cameras ? (this.config.unifi as UnifiConfig).excluded_cameras : [];

log.info('VIDEO PROCESSOR: ' + ((this.config.videoConfig as any).videoProcessor || pathToFfmpeg || 'ffmpeg'));

this.api.on(APIEvent.DID_FINISH_LAUNCHING, () => {
//Hack to get async functions!
setTimeout(async () => {
Expand Down

0 comments on commit ec933b9

Please sign in to comment.