aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorPhlogi <Phlogi@users.noreply.github.com>2019-03-24 12:11:46 +0100
committerGitHub <noreply@github.com>2019-03-24 12:11:46 +0100
commit69cc5814d85733f5bec9cac03e78caa1324406fe (patch)
tree691505b6655bfe67169d38eceb2005f9f2725529 /Emby.Server.Implementations/ApplicationHost.cs
parent414a318a0d422a893401d1ecf84526043df36210 (diff)
Change WAN IP behaviour: Use ServerConfiguration.WanDdns if set in configuration.
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 5f4c30f0f..7e236002a 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1372,7 +1372,15 @@ namespace Emby.Server.Implementations
public async Task<SystemInfo> GetSystemInfo(CancellationToken cancellationToken)
{
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
- var wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false);
+
+ if ( String.IsNullOrEmpty(ServerConfiguration.WanDdns) ){
+ var wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false);
+ } else {
+ // Use the (dynmic) domain name set in the configuration if available instead of querying
+ // an external service to get the IP address
+ // The domain resolution to the ip should be part of the client, not the server.
+ var wanAddress = ServerConfiguration.WanDdns;
+ }
return new SystemInfo
{