diff options
| author | crobibero <cody@robibe.ro> | 2020-09-11 15:53:04 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-09-11 15:53:04 -0600 |
| commit | f13b87afa3e81e7fa2710caec58a7d6cb20f7635 (patch) | |
| tree | 0f269ac5baa27b334c5377d9dec4010aedf25183 /MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | |
| parent | 2363ad544979adf32207fa927f106fadb784f1fb (diff) | |
| parent | 6bf0acb854683377bebad3ca27de17706519c420 (diff) | |
Merge remote-tracking branch 'upstream/master' into api-upload-subtitle
Diffstat (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs')
| -rw-r--r-- | MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index c0043c0ef..f9285c768 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -9,6 +9,12 @@ namespace MediaBrowser.Controller.Extensions public static class ConfigurationExtensions { /// <summary> + /// The key for a setting that specifies the default redirect path + /// to use for requests where the URL base prefix is invalid or missing.. + /// </summary> + public const string DefaultRedirectKey = "DefaultRedirectPath"; + + /// <summary> /// The key for a setting that indicates whether the application should host web client content. /// </summary> public const string HostWebClientKey = "hostwebclient"; @@ -24,11 +30,26 @@ namespace MediaBrowser.Controller.Extensions public const string FfmpegAnalyzeDurationKey = "FFmpeg:analyzeduration"; /// <summary> + /// The key for the FFmpeg path option. + /// </summary> + public const string FfmpegPathKey = "ffmpeg"; + + /// <summary> /// The key for a setting that indicates whether playlists should allow duplicate entries. /// </summary> public const string PlaylistsAllowDuplicatesKey = "playlists:allowDuplicates"; /// <summary> + /// The key for a setting that indicates whether kestrel should bind to a unix socket. + /// </summary> + public const string BindToUnixSocketKey = "kestrel:socket"; + + /// <summary> + /// The key for the unix socket path. + /// </summary> + public const string UnixSocketPathKey = "kestrel:socketPath"; + + /// <summary> /// Gets a value indicating whether the application should host static web content from the <see cref="IConfiguration"/>. /// </summary> /// <param name="configuration">The configuration to retrieve the value from.</param> @@ -60,5 +81,21 @@ namespace MediaBrowser.Controller.Extensions /// <returns>True if playlists should allow duplicates, otherwise false.</returns> public static bool DoPlaylistsAllowDuplicates(this IConfiguration configuration) => configuration.GetValue<bool>(PlaylistsAllowDuplicatesKey); + + /// <summary> + /// Gets a value indicating whether kestrel should bind to a unix socket from the <see cref="IConfiguration" />. + /// </summary> + /// <param name="configuration">The configuration to read the setting from.</param> + /// <returns><c>true</c> if kestrel should bind to a unix socket, otherwise <c>false</c>.</returns> + public static bool UseUnixSocket(this IConfiguration configuration) + => configuration.GetValue<bool>(BindToUnixSocketKey); + + /// <summary> + /// Gets the path for the unix socket from the <see cref="IConfiguration" />. + /// </summary> + /// <param name="configuration">The configuration to read the setting from.</param> + /// <returns>The unix socket path.</returns> + public static string GetUnixSocketPath(this IConfiguration configuration) + => configuration[UnixSocketPathKey]; } } |
