Merge pull request #5312 from BaronGreenback/FixFor5280

This commit is contained in:
Claus Vium 2021-02-27 20:01:51 +01:00 committed by GitHub
commit 9e77fdc70d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View File

@ -316,9 +316,12 @@ namespace Emby.Dlna.Main
_logger.LogInformation("Registering publisher for {0} on {1}", fullService, address);
var uri = new UriBuilder(_appHost.GetSmartApiUrl(address.Address) + descriptorUri);
// DLNA will only work over http, so we must reset to http:// : {port}
uri.Scheme = "http://";
uri.Port = _netConfig.HttpServerPortNumber;
if (_appHost.PublishedServerUrl == null)
{
// DLNA will only work over http, so we must reset to http:// : {port}.
uri.Scheme = "http";
uri.Port = _netConfig.HttpServerPortNumber;
}
var device = new SsdpRootDevice
{

View File

@ -135,6 +135,9 @@ namespace Emby.Server.Implementations
public bool CoreStartupHasCompleted { get; private set; }
/// <inheritdoc />
public Uri PublishedServerUrl => _startupOptions.PublishedServerUrl;
public virtual bool CanLaunchWebBrowser
{
get

View File

@ -52,6 +52,11 @@ namespace MediaBrowser.Controller
/// <value>The name of the friendly.</value>
string FriendlyName { get; }
/// <summary>
/// Gets the configured published server url.
/// </summary>
Uri PublishedServerUrl { get; }
/// <summary>
/// Gets the system info.
/// </summary>