From 6c8ca30f7fc02170901a969c71dc35ec8992ad02 Mon Sep 17 00:00:00 2001 From: gnattu Date: Thu, 29 Aug 2024 02:43:37 +0800 Subject: Prevent server from starting if the ffmpeg path is invalid (#12463) --- .../Extensions/ConfigurationExtensions.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs') diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index 6c58064ce..0aaf4fcd9 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -29,6 +29,11 @@ namespace MediaBrowser.Controller.Extensions /// public const string FfmpegProbeSizeKey = "FFmpeg:probesize"; + /// + /// The key for the skipping FFmpeg validation. + /// + public const string FfmpegSkipValidationKey = "FFmpeg:novalidation"; + /// /// The key for the FFmpeg analyze duration option. /// @@ -89,6 +94,14 @@ namespace MediaBrowser.Controller.Extensions public static string? GetFFmpegAnalyzeDuration(this IConfiguration configuration) => configuration[FfmpegAnalyzeDurationKey]; + /// + /// Gets a value indicating whether the server should validate FFmpeg during startup. + /// + /// The configuration to read the setting from. + /// true if the server should validate FFmpeg during startup, otherwise false. + public static bool GetFFmpegSkipValidation(this IConfiguration configuration) + => configuration.GetValue(FfmpegSkipValidationKey); + /// /// Gets a value indicating whether playlists should allow duplicate entries from the . /// -- cgit v1.2.3