aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/StartupOptions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server/StartupOptions.cs')
-rw-r--r--Jellyfin.Server/StartupOptions.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Jellyfin.Server/StartupOptions.cs b/Jellyfin.Server/StartupOptions.cs
index 42c5fa86e..0f15488f4 100644
--- a/Jellyfin.Server/StartupOptions.cs
+++ b/Jellyfin.Server/StartupOptions.cs
@@ -1,5 +1,8 @@
+using System.Collections.Generic;
+using System.Globalization;
using CommandLine;
using Emby.Server.Implementations;
+using MediaBrowser.Controller.Extensions;
namespace Jellyfin.Server
{
@@ -72,5 +75,15 @@ namespace Jellyfin.Server
/// <inheritdoc />
[Option("restartargs", Required = false, HelpText = "Arguments for restart script.")]
public string? RestartArgs { get; set; }
+
+ /// <summary>
+ /// Gets the command line options as a dictionary that can be used in the .NET configuration system.
+ /// </summary>
+ /// <returns>The configuration dictionary.</returns>
+ public Dictionary<string, string> ConvertToConfig()
+ => new Dictionary<string, string>
+ {
+ { ConfigurationExtensions.NoWebContentKey, NoWebContent.ToString(CultureInfo.InvariantCulture) }
+ };
}
}