mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Removed trailing spaces, renamed get wan IP function.
This commit is contained in:
parent
6480cfcc87
commit
4c8f8cf64c
@ -1376,7 +1376,7 @@ namespace Emby.Server.Implementations
|
|||||||
|
|
||||||
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
|
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
|
||||||
{
|
{
|
||||||
wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false);
|
wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1435,7 +1435,7 @@ namespace Emby.Server.Implementations
|
|||||||
|
|
||||||
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
|
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
|
||||||
{
|
{
|
||||||
wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false);
|
wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1478,7 +1478,7 @@ namespace Emby.Server.Implementations
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> GetWanApiUrl(CancellationToken cancellationToken)
|
public async Task<string> GetWanApiUrlFromExternal(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
const string Url = "http://ipv4.icanhazip.com";
|
const string Url = "http://ipv4.icanhazip.com";
|
||||||
try
|
try
|
||||||
@ -1524,7 +1524,7 @@ namespace Emby.Server.Implementations
|
|||||||
}
|
}
|
||||||
return string.Format("http://{0}:{1}",
|
return string.Format("http://{0}:{1}",
|
||||||
host,
|
host,
|
||||||
HttpPort.ToString(CultureInfo.InvariantCulture));
|
HttpPort.ToString(CultureInfo.InvariantCulture));
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetWanApiUrl(IpAddressInfo ipAddress)
|
public string GetWanApiUrl(IpAddressInfo ipAddress)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user