aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/StartupOptions.cs
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-03-15 15:34:09 +0100
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-03-15 15:34:09 +0100
commit2a0153737131a404a8ccd386ad09ff4a1a697dfc (patch)
tree2a8b37bc0382f23a1a4f8693eca44306751ad7d4 /Jellyfin.Server/StartupOptions.cs
parent0996ce28987027afe5943ca9787d4a5695c2ee0a (diff)
Merge command line options into framework configuration
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) }
+ };
}
}