mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-14 06:06:41 +00:00
Renaming variable and refactoring IF statement
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using System;
|
||||
|
||||
namespace Emby.Server.Implementations
|
||||
{
|
||||
public interface IStartupOptions
|
||||
@@ -40,6 +42,6 @@ namespace Emby.Server.Implementations
|
||||
/// <summary>
|
||||
/// Gets the value of the --auto-discover-publish-url command line option.
|
||||
/// </summary>
|
||||
string AutoDiscoverPublishUrl { get; }
|
||||
Uri PublishedServerUrl { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.Udp
|
||||
/// <summary>
|
||||
/// Address Override Configuration Key
|
||||
/// </summary>
|
||||
public const string AddressOverrideConfigKey = "AutoDiscoverAddressOverride";
|
||||
public const string AddressOverrideConfigKey = "PublishedServerUrl";
|
||||
|
||||
private Socket _udpSocket;
|
||||
private IPEndPoint _endpoint;
|
||||
@@ -47,17 +47,9 @@ namespace Emby.Server.Implementations.Udp
|
||||
|
||||
private async Task RespondToV2Message(string messageText, EndPoint endpoint, CancellationToken cancellationToken)
|
||||
{
|
||||
string localUrl;
|
||||
|
||||
if (!string.IsNullOrEmpty(_config[AddressOverrideConfigKey]))
|
||||
{
|
||||
localUrl = _config[AddressOverrideConfigKey];
|
||||
}
|
||||
else
|
||||
{
|
||||
localUrl = await _appHost.GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
string localUrl = !string.IsNullOrEmpty(_config[AddressOverrideConfigKey])
|
||||
? _config[AddressOverrideConfigKey]
|
||||
: await _appHost.GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (!string.IsNullOrEmpty(localUrl))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user