Use extension methods

This commit is contained in:
Bond-009 2019-12-12 17:02:42 +01:00
parent 2c0259f920
commit 6464bca791
2 changed files with 5 additions and 4 deletions

View File

@ -22,7 +22,7 @@ namespace MediaBrowser.Controller.Extensions
/// </summary>
/// <param name="configuration">This configuration.</param>
/// <returns>The FFmpeg probe size option.</returns>
public static string GetProbeSize(this IConfiguration configuration)
public static string GetFFmpegProbeSize(this IConfiguration configuration)
=> configuration[FfmpegProbeSizeKey];
/// <summary>
@ -30,7 +30,7 @@ namespace MediaBrowser.Controller.Extensions
/// </summary>
/// <param name="configuration">This configuration.</param>
/// <returns>The FFmpeg analyse duration option.</returns>
public static string GetAnalyzeDuration(this IConfiguration configuration)
public static string GetFFmpegAnalyzeDuration(this IConfiguration configuration)
=> configuration[FfmpegAnalyzeDurationKey];
}
}

View File

@ -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)
{