Renaming variable and refactoring IF statement

This commit is contained in:
Neil Burrows
2020-05-20 09:05:51 +01:00
parent b737301c70
commit d7b2c2a176
3 changed files with 12 additions and 17 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using CommandLine;
using Emby.Server.Implementations;
@@ -83,8 +84,8 @@ namespace Jellyfin.Server
public string? PluginManifestUrl { get; set; }
/// <inheritdoc />
[Option("auto-discover-publish-url", Required = false, HelpText = "Jellyfin Server URL to publish via auto discover process")]
public string? AutoDiscoverPublishUrl { get; set; }
[Option("published-server-url", Required = false, HelpText = "Jellyfin Server URL to publish via auto discover process")]
public Uri? PublishedServerUrl { get; set; }
/// <summary>
/// Gets the command line options as a dictionary that can be used in the .NET configuration system.
@@ -104,9 +105,9 @@ namespace Jellyfin.Server
config.Add(ConfigurationExtensions.HostWebClientKey, bool.FalseString);
}
if (AutoDiscoverPublishUrl != null)
if (PublishedServerUrl != null)
{
config.Add(UdpServer.AddressOverrideConfigKey, AutoDiscoverPublishUrl);
config.Add(UdpServer.AddressOverrideConfigKey, PublishedServerUrl.ToString());
}
return config;