mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Fix check for available WAN address.
This commit is contained in:
parent
fb7f29de18
commit
087d4153ae
@ -1372,10 +1372,13 @@ 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 = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
|
var wanAddress = System.String.Empty;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(wanAddress)){
|
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns)){
|
||||||
wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false);
|
wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SystemInfo
|
return new SystemInfo
|
||||||
@ -1425,11 +1428,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 = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
|
var wanAddress = System.String.Empty;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(wanAddress)){
|
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns)){
|
||||||
wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false);
|
wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
|
||||||
}
|
}
|
||||||
return new PublicSystemInfo
|
return new PublicSystemInfo
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user