mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
Prevent server from starting if the ffmpeg path is invalid (#12463)
This commit is contained in:
@@ -29,6 +29,11 @@ namespace MediaBrowser.Controller.Extensions
|
||||
/// </summary>
|
||||
public const string FfmpegProbeSizeKey = "FFmpeg:probesize";
|
||||
|
||||
/// <summary>
|
||||
/// The key for the skipping FFmpeg validation.
|
||||
/// </summary>
|
||||
public const string FfmpegSkipValidationKey = "FFmpeg:novalidation";
|
||||
|
||||
/// <summary>
|
||||
/// The key for the FFmpeg analyze duration option.
|
||||
/// </summary>
|
||||
@@ -89,6 +94,14 @@ namespace MediaBrowser.Controller.Extensions
|
||||
public static string? GetFFmpegAnalyzeDuration(this IConfiguration configuration)
|
||||
=> configuration[FfmpegAnalyzeDurationKey];
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the server should validate FFmpeg during startup.
|
||||
/// </summary>
|
||||
/// <param name="configuration">The configuration to read the setting from.</param>
|
||||
/// <returns><c>true</c> if the server should validate FFmpeg during startup, otherwise <c>false</c>.</returns>
|
||||
public static bool GetFFmpegSkipValidation(this IConfiguration configuration)
|
||||
=> configuration.GetValue<bool>(FfmpegSkipValidationKey);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether playlists should allow duplicate entries from the <see cref="IConfiguration"/>.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user