No need to assign empty string.

This commit is contained in:
Phlogi 2019-03-25 21:43:50 +01:00 committed by GitHub
parent 4c8f8cf64c
commit 1b03f078b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1372,15 +1372,14 @@ namespace Emby.Server.Implementations
public async Task<SystemInfo> GetSystemInfo(CancellationToken cancellationToken)
{
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
var wanAddress = string.Empty;
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
{
wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
var wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
}
else
{
wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
var wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
}
return new SystemInfo
@ -1431,15 +1430,14 @@ namespace Emby.Server.Implementations
public async Task<PublicSystemInfo> GetPublicSystemInfo(CancellationToken cancellationToken)
{
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
var wanAddress = string.Empty;
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
{
wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
var wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
}
else
{
wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
var wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
}
return new PublicSystemInfo
{