diff options
Diffstat (limited to 'Jellyfin.Server/StartupOptions.cs')
| -rw-r--r-- | Jellyfin.Server/StartupOptions.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Jellyfin.Server/StartupOptions.cs b/Jellyfin.Server/StartupOptions.cs index 1fb1c5af8..6e15d058f 100644 --- a/Jellyfin.Server/StartupOptions.cs +++ b/Jellyfin.Server/StartupOptions.cs @@ -1,5 +1,8 @@ +using System.Collections.Generic; using CommandLine; using Emby.Server.Implementations; +using Emby.Server.Implementations.Updates; +using MediaBrowser.Controller.Extensions; namespace Jellyfin.Server { @@ -16,6 +19,12 @@ namespace Jellyfin.Server public string? DataDir { get; set; } /// <summary> + /// Gets or sets a value indicating whether the server should not host the web client. + /// </summary> + [Option("nowebclient", Required = false, HelpText = "Indicates that the web server should not host the web client.")] + public bool NoWebClient { get; set; } + + /// <summary> /// Gets or sets the path to the web directory. /// </summary> /// <value>The path to the web directory.</value> @@ -66,5 +75,30 @@ namespace Jellyfin.Server /// <inheritdoc /> [Option("restartargs", Required = false, HelpText = "Arguments for restart script.")] public string? RestartArgs { get; set; } + + /// <inheritdoc /> + [Option("plugin-manifest-url", Required = false, HelpText = "A custom URL for the plugin repository JSON manifest")] + public string? PluginManifestUrl { 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() + { + var config = new Dictionary<string, string>(); + + if (PluginManifestUrl != null) + { + config.Add(InstallationManager.PluginManifestUrlKey, PluginManifestUrl); + } + + if (NoWebClient) + { + config.Add(ConfigurationExtensions.HostWebClientKey, bool.FalseString); + } + + return config; + } } } |
