aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs')
-rw-r--r--MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs37
1 files changed, 34 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
index f9285c768..6c58064ce 100644
--- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
+++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
@@ -15,6 +15,11 @@ namespace MediaBrowser.Controller.Extensions
public const string DefaultRedirectKey = "DefaultRedirectPath";
/// <summary>
+ /// The key for the address override option.
+ /// </summary>
+ public const string AddressOverrideKey = "PublishedServerUrl";
+
+ /// <summary>
/// The key for a setting that indicates whether the application should host web client content.
/// </summary>
public const string HostWebClientKey = "hostwebclient";
@@ -50,6 +55,16 @@ namespace MediaBrowser.Controller.Extensions
public const string UnixSocketPathKey = "kestrel:socketPath";
/// <summary>
+ /// The permissions for the unix socket.
+ /// </summary>
+ public const string UnixSocketPermissionsKey = "kestrel:socketPermissions";
+
+ /// <summary>
+ /// The cache size of the SQL database, see cache_size.
+ /// </summary>
+ public const string SqliteCacheSizeKey = "sqlite:cacheSize";
+
+ /// <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>
@@ -63,7 +78,7 @@ namespace MediaBrowser.Controller.Extensions
/// </summary>
/// <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)
+ public static string? GetFFmpegProbeSize(this IConfiguration configuration)
=> configuration[FfmpegProbeSizeKey];
/// <summary>
@@ -71,7 +86,7 @@ namespace MediaBrowser.Controller.Extensions
/// </summary>
/// <param name="configuration">The configuration to read the setting from.</param>
/// <returns>The FFmpeg analyze duration option.</returns>
- public static string GetFFmpegAnalyzeDuration(this IConfiguration configuration)
+ public static string? GetFFmpegAnalyzeDuration(this IConfiguration configuration)
=> configuration[FfmpegAnalyzeDurationKey];
/// <summary>
@@ -95,7 +110,23 @@ namespace MediaBrowser.Controller.Extensions
/// </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)
+ public static string? GetUnixSocketPath(this IConfiguration configuration)
=> configuration[UnixSocketPathKey];
+
+ /// <summary>
+ /// Gets the permissions 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 permissions.</returns>
+ public static string? GetUnixSocketPermissions(this IConfiguration configuration)
+ => configuration[UnixSocketPermissionsKey];
+
+ /// <summary>
+ /// Gets the cache_size from the <see cref="IConfiguration" />.
+ /// </summary>
+ /// <param name="configuration">The configuration to read the setting from.</param>
+ /// <returns>The sqlite cache size.</returns>
+ public static int? GetSqliteCacheSize(this IConfiguration configuration)
+ => configuration.GetValue<int?>(SqliteCacheSizeKey);
}
}