mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-22 05:30:46 +02:00
No need to assign empty string.
This commit is contained in:
parent
4c8f8cf64c
commit
1b03f078b9
|
@ -1372,15 +1372,14 @@ namespace Emby.Server.Implementations
|
||||||
public async Task<SystemInfo> GetSystemInfo(CancellationToken cancellationToken)
|
public async Task<SystemInfo> GetSystemInfo(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
|
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
|
||||||
var wanAddress = string.Empty;
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
|
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
|
||||||
{
|
{
|
||||||
wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
|
var wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
|
var wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SystemInfo
|
return new SystemInfo
|
||||||
|
@ -1431,15 +1430,14 @@ namespace Emby.Server.Implementations
|
||||||
public async Task<PublicSystemInfo> GetPublicSystemInfo(CancellationToken cancellationToken)
|
public async Task<PublicSystemInfo> GetPublicSystemInfo(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
|
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
|
||||||
var wanAddress = string.Empty;
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
|
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
|
||||||
{
|
{
|
||||||
wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
|
var wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
|
var wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
|
||||||
}
|
}
|
||||||
return new PublicSystemInfo
|
return new PublicSystemInfo
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue