Use the new method in DLNA

This commit is contained in:
cvium
2021-11-08 10:58:04 +01:00
parent f03e77a4d5
commit 82e6a21f3b
3 changed files with 13 additions and 16 deletions

View File

@@ -1166,10 +1166,13 @@ namespace Emby.Server.Implementations
}
/// <inheritdoc/>
public string GetApiUrlForLocalAccess()
public string GetApiUrlForLocalAccess(bool allowHttps)
{
string smart = NetManager.GetBindInterface(string.Empty, out var port);
return GetLocalApiUrl(smart.Trim('/'), null, port);
// With an empty source, the port will be null
string smart = NetManager.GetBindInterface(string.Empty, out _);
var scheme = allowHttps ? Uri.UriSchemeHttps : Uri.UriSchemeHttp;
var port = allowHttps ? HttpsPort : HttpPort;
return GetLocalApiUrl(smart.Trim('/'), scheme, port);
}
/// <inheritdoc/>