diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index 7ab62b262..76c9b4b26 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -22,7 +22,7 @@ namespace MediaBrowser.Controller.Extensions /// /// This configuration. /// The FFmpeg probe size option. - public static string GetProbeSize(this IConfiguration configuration) + public static string GetFFmpegProbeSize(this IConfiguration configuration) => configuration[FfmpegProbeSizeKey]; /// @@ -30,7 +30,7 @@ namespace MediaBrowser.Controller.Extensions /// /// This configuration. /// The FFmpeg analyse duration option. - public static string GetAnalyzeDuration(this IConfiguration configuration) + public static string GetFFmpegAnalyzeDuration(this IConfiguration configuration) => configuration[FfmpegAnalyzeDurationKey]; } } diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 370468958..04b3c2f07 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Text; using System.Threading; using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Extensions; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dto; @@ -2049,10 +2050,10 @@ namespace MediaBrowser.Controller.MediaEncoding } public string GetProbeSizeArgument(int numInputFiles) - => numInputFiles > 1 ? "-probesize " + _configuration["FFmpeg:probesize"] : string.Empty; + => numInputFiles > 1 ? "-probesize " + _configuration.GetFFmpegProbeSize() : string.Empty; public string GetAnalyzeDurationArgument(int numInputFiles) - => numInputFiles > 1 ? "-analyzeduration " + _configuration["FFmpeg:analyzeduration"] : string.Empty; + => numInputFiles > 1 ? "-analyzeduration " + _configuration.GetFFmpegAnalyzeDuration() : string.Empty; public string GetInputModifier(EncodingJobInfo state, EncodingOptions encodingOptions) {