From cbe47325b328b70e5a49dc231a70d3709f71dbbd Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Thu, 23 Jul 2020 13:18:47 +0200 Subject: Make UNIX socket configurable --- .../Extensions/ConfigurationExtensions.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs') diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index c2932cc4c..ae02c1cee 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -33,6 +33,16 @@ namespace MediaBrowser.Controller.Extensions /// public const string PlaylistsAllowDuplicatesKey = "playlists:allowDuplicates"; + /// + /// The key for a setting that indicates whether kestrel should bind to a unix socket. + /// + public const string BindToUnixSocketKey = "kerstrel:socket"; + + /// + /// The key for the unix socket path. + /// + public const string UnixSocketPathKey = "kerstrel:socketPath"; + /// /// Gets a value indicating whether the application should host static web content from the . /// @@ -65,5 +75,21 @@ namespace MediaBrowser.Controller.Extensions /// True if playlists should allow duplicates, otherwise false. public static bool DoPlaylistsAllowDuplicates(this IConfiguration configuration) => configuration.GetValue(PlaylistsAllowDuplicatesKey); + + /// + /// Gets a value indicating whether kestrel should bind to a unix socket from the . + /// + /// The configuration to read the setting from. + /// true if kestrel should bind to a unix socket, otherwise false. + public static bool UseUnixSocket(this IConfiguration configuration) + => configuration.GetValue(BindToUnixSocketKey); + + /// + /// Gets the path for the unix socket from the . + /// + /// The configuration to read the setting from. + /// The unix socket path. + public static string GetUnixSocketPath(this IConfiguration configuration) + => configuration[FfmpegAnalyzeDurationKey]; } } -- cgit v1.2.3 From 1cc62d6afa121607abf5c68a088de790f105f917 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Fri, 24 Jul 2020 09:36:18 +0200 Subject: Update MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs Co-authored-by: David Mouse --- MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs') diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index ae02c1cee..425b39fd9 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -36,12 +36,12 @@ namespace MediaBrowser.Controller.Extensions /// /// The key for a setting that indicates whether kestrel should bind to a unix socket. /// - public const string BindToUnixSocketKey = "kerstrel:socket"; + public const string BindToUnixSocketKey = "kestrel:socket"; /// /// The key for the unix socket path. /// - public const string UnixSocketPathKey = "kerstrel:socketPath"; + public const string UnixSocketPathKey = "kestrel:socketPath"; /// /// Gets a value indicating whether the application should host static web content from the . -- cgit v1.2.3 From 6c92154a9bc78deeafa313c96c1fe474a5976776 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Sun, 9 Aug 2020 13:55:57 +0200 Subject: Update MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs Co-authored-by: David --- MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs') diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index 425b39fd9..4c2209b67 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -90,6 +90,6 @@ namespace MediaBrowser.Controller.Extensions /// The configuration to read the setting from. /// The unix socket path. public static string GetUnixSocketPath(this IConfiguration configuration) - => configuration[FfmpegAnalyzeDurationKey]; + => configuration[UnixSocketPathKey]; } } -- cgit v1.2.3