From 99f0799a116ba09c1d0d4770a71ec8ea2a71a81c Mon Sep 17 00:00:00 2001 From: advplyr Date: Thu, 14 Mar 2024 16:29:01 -0500 Subject: [PATCH] Update:Adding support for skipping check for ffmpeg/ffprobe binaries with environment variable SKIP_BINARIES_CHECK - Set SKIP_BINARIES_CHECK=1 env variable to skip - Or set SkipBinariesCheck: true in dev.js #2741 --- index.js | 1 + server/managers/BinaryManager.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/index.js b/index.js index 79d06c3d..c4488f1b 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,7 @@ if (isDev) { if (devEnv.MetadataPath) process.env.METADATA_PATH = devEnv.MetadataPath if (devEnv.FFmpegPath) process.env.FFMPEG_PATH = devEnv.FFmpegPath if (devEnv.FFProbePath) process.env.FFPROBE_PATH = devEnv.FFProbePath + if (devEnv.SkipBinariesCheck) process.env.SKIP_BINARIES_CHECK = '1' process.env.SOURCE = 'local' process.env.ROUTER_BASE_PATH = devEnv.RouterBasePath || '' } diff --git a/server/managers/BinaryManager.js b/server/managers/BinaryManager.js index b4121ab8..25eb1ebc 100644 --- a/server/managers/BinaryManager.js +++ b/server/managers/BinaryManager.js @@ -24,7 +24,14 @@ class BinaryManager { } async init() { + // Optional skip binaries check + if (process.env.SKIP_BINARIES_CHECK === '1') { + Logger.info('[BinaryManager] Skipping check for binaries') + return + } + if (this.initialized) return + const missingBinaries = await this.findRequiredBinaries() if (missingBinaries.length == 0) return await this.removeOldBinaries(missingBinaries)