using System;
using Microsoft.Extensions.Configuration;
namespace MediaBrowser.Controller.Extensions
{
///
/// Configuration extensions for MediaBrowser.Controller.
///
public static class ConfigurationExtensions
{
///
/// The key for a setting that indicates whether the application should host static web content.
///
public const string NoWebContentKey = "nowebcontent";
///
/// The key for the FFmpeg probe size option.
///
public const string FfmpegProbeSizeKey = "FFmpeg:probesize";
///
/// The key for the FFmpeg analyse duration option.
///
public const string FfmpegAnalyzeDurationKey = "FFmpeg:analyzeduration";
///
/// Retrieves a config value indicating whether the application should not host
/// static web content from the .
///
/// The configuration to retrieve the value from.
/// The parsed config value.
/// The config value is not a valid bool string. See .
public static bool IsNoWebContent(this IConfiguration configuration)
=> configuration.GetValue(NoWebContentKey);
///
/// Retrieves the FFmpeg probe size from the .
///
/// This configuration.
/// The FFmpeg probe size option.
public static string GetFFmpegProbeSize(this IConfiguration configuration)
=> configuration[FfmpegProbeSizeKey];
///
/// Retrieves the FFmpeg analyse duration from the .
///
/// This configuration.
/// The FFmpeg analyse duration option.
public static string GetFFmpegAnalyzeDuration(this IConfiguration configuration)
=> configuration[FfmpegAnalyzeDurationKey];
}
}