The Free Software Media System - Server Backend & API
Merge remote-tracking branch 'upstream/master' into support-running-without-web-content
Mark Monteiroef7497e83790
diff --cc Emby.Server.Implementations/ConfigurationOptions.csindex a7e9369cf9,31fb5ca58c..814d4b8b57--- a/Emby.Server.Implementations/ConfigurationOptions.cs+++ b/Emby.Server.Implementations/ConfigurationOptions.cs@@@ -5,20 -3,14 +5,21 @@@ using static MediaBrowser.Controller.Exnamespace Emby.Server.Implementations{+ /// <summary>+ /// Static class containing the default configuration options for the web server.+ /// </summary>public static class ConfigurationOptions{- public static Dictionary<string, string> Configuration => new Dictionary<string, string>+ /// <summary>+ /// Gets a new copy of the default configuration options.+ /// </summary>+ public static Dictionary<string, string> DefaultConfiguration => new Dictionary<string, string>{- { "HttpListenerHost:DefaultRedirectPath", "web/index.html" },+ { NoWebContentKey, bool.FalseString },+ { HttpListenerHost.DefaultRedirectKey, "web/index.html" },{ FfmpegProbeSizeKey, "1G" },- { FfmpegAnalyzeDurationKey, "200M" }+ { FfmpegAnalyzeDurationKey, "200M" },+ { PlaylistsAllowDuplicatesKey, bool.TrueString }};}}diff --cc MediaBrowser.Controller/Extensions/ConfigurationExtensions.csindex e802eeed2a,48316499a4..900cc6cb57--- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs+++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs@@@ -24,19 -18,14 +24,23 @@@ namespace MediaBrowser.Controller.Extenpublic const string FfmpegAnalyzeDurationKey = "FFmpeg:analyzeduration";/// <summary>- /// Retrieves a config value indicating whether the application should not host- /// static web content from the <see cref="IConfiguration"/>.+ /// The key for a setting that indicates whether playlists should allow duplicate entries.+ /// </summary>+ public const string PlaylistsAllowDuplicatesKey = "playlists:allowDuplicates";+++ /// <summary>++ /// Gets a value indicating whether the application should not host static web content from the <see cref="IConfiguration"/>.+ /// </summary>+ /// <param name="configuration">The configuration to retrieve the value from.</param>+ /// <returns>The parsed config value.</returns>+ /// <exception cref="FormatException">The config value is not a valid bool string. See <see cref="bool.Parse(string)"/>.</exception>+ public static bool NoWebContent(this IConfiguration configuration)+ => configuration.GetValue<bool>(NoWebContentKey);+/// <summary>- /// Retrieves the FFmpeg probe size from the <see cref="IConfiguration" />.+ /// Gets the FFmpeg probe size from the <see cref="IConfiguration" />./// </summary>- /// <param name="configuration">This configuration.</param>+ /// <param name="configuration">The configuration to read the setting from.</param>/// <returns>The FFmpeg probe size option.</returns>public static string GetFFmpegProbeSize(this IConfiguration configuration)=> configuration[FfmpegProbeSizeKey];