From 5f85f3aef99a431a81f061ecea3a2ff87844a5bc Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Thu, 14 Jul 2022 17:28:37 +0200 Subject: [PATCH] Fix white screen when core version is too old but doesn't have any auths enabled --- src/utils/restreamer.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/utils/restreamer.js b/src/utils/restreamer.js index 54729e0..2c2ec2f 100644 --- a/src/utils/restreamer.js +++ b/src/utils/restreamer.js @@ -358,7 +358,9 @@ class Restreamer { } compatibility.core.have = this.Version().number; - compatibility.ffmpeg.have = this.skills.ffmpeg.version; + if (this.skills?.ffmpeg?.version) { + compatibility.ffmpeg.have = this.skills.ffmpeg.version; + } compatibility.core.compatible = SemverSatisfies(compatibility.core.have, compatibility.core.want); compatibility.ffmpeg.compatible = SemverSatisfies(compatibility.ffmpeg.have, compatibility.ffmpeg.want); @@ -371,8 +373,13 @@ class Restreamer { } async _init() { - await this._initConfig(); + const compatibility = this.Compatibility(); + if (!compatibility.compatible) { + return; + } + await this._initSkills(); + await this._initConfig(); await this._discoverChannels(); } @@ -889,6 +896,10 @@ class Restreamer { } ConfigOverrides(name) { + if (!this.config) { + return false; + } + return this.config.overrides.includes(name); }