aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorPhlogi <Phlogi@users.noreply.github.com>2019-03-24 17:02:03 +0100
committerGitHub <noreply@github.com>2019-03-24 17:02:03 +0100
commit030fcaac156e9d75d4e7e84b0bea1291b91c0079 (patch)
treefa63c831b24b6407a1290dd2df43b206811cc585 /Emby.Server.Implementations/ApplicationHost.cs
parent7ebb043249d9c13c3bf2cc41c52d71c4e73f40f9 (diff)
Proper access to configuration objects
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 1a64c8eaa..fea23a3d7 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1372,11 +1372,10 @@ namespace Emby.Server.Implementations
public async Task<SystemInfo> GetSystemInfo(CancellationToken cancellationToken)
{
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
+ var wanAddress = ServerConfigurationManager.Configuration.WanDdns;
- if (string.IsNullOrEmpty(ServerConfiguration.WanDdns)){
+ if (string.IsNullOrEmpty(wanAddress)){
var wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false);
- } else {
- var wanAddress = ServerConfiguration.WanDdns;
}
return new SystemInfo
@@ -1530,11 +1529,11 @@ namespace Emby.Server.Implementations
{
return string.Format("https://{0}:{1}",
host,
- ServerConfiguration.PublicHttpsPort.ToString(CultureInfo.InvariantCulture));
+ ServerConfigurationManager.Configuration.PublicHttpsPort.ToString(CultureInfo.InvariantCulture));
}
return string.Format("http://{0}:{1}",
host,
- ServerConfiguration.PublicPort.ToString(CultureInfo.InvariantCulture));
+ ServerConfigurationManager.Configuration.PublicPort.ToString(CultureInfo.InvariantCulture));
}
public Task<List<IpAddressInfo>> GetLocalIpAddresses(CancellationToken cancellationToken)