using Microsoft.Extensions.Configuration;
namespace MediaBrowser.Controller.Extensions
{
    /// 
    /// Configuration extensions for MediaBrowser.Controller.
    /// 
    public static class ConfigurationExtensions
    {
        /// 
        /// The key for the FFmpeg probe size option.
        /// 
        public const string FfmpegProbeSizeKey = "FFmpeg:probesize";
        /// 
        /// The key for the FFmpeg analyze duration option.
        /// 
        public const string FfmpegAnalyzeDurationKey = "FFmpeg:analyzeduration";
        /// 
        /// The key for a setting that indicates whether playlists should allow duplicate entries.
        /// 
        public const string PlaylistsAllowDuplicatesKey = "playlists:allowDuplicates";
        /// 
        /// Gets the FFmpeg probe size from the .
        /// 
        /// The configuration to read the setting from.
        /// The FFmpeg probe size option.
        public static string GetFFmpegProbeSize(this IConfiguration configuration)
            => configuration[FfmpegProbeSizeKey];
        /// 
        /// Gets the FFmpeg analyze duration from the .
        /// 
        /// The configuration to read the setting from.
        /// The FFmpeg analyze duration option.
        public static string GetFFmpegAnalyzeDuration(this IConfiguration configuration)
            => configuration[FfmpegAnalyzeDurationKey];
        /// 
        /// Gets a value indicating whether playlists should allow duplicate entries from the .
        /// 
        /// The configuration to read the setting from.
        /// True if playlists should allow duplicates, otherwise false.
        public static bool DoPlaylistsAllowDuplicates(this IConfiguration configuration)
            => configuration.GetValue(PlaylistsAllowDuplicatesKey);
    }
}