diff options
| -rw-r--r-- | Emby.Dlna/Main/DlnaEntryPoint.cs | 9 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Controller/IServerApplicationHost.cs | 5 |
3 files changed, 14 insertions, 3 deletions
diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs index 8f60c3f78..ec8716029 100644 --- a/Emby.Dlna/Main/DlnaEntryPoint.cs +++ b/Emby.Dlna/Main/DlnaEntryPoint.cs @@ -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 { diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index a24f941d0..2ba585d30 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -134,6 +134,9 @@ namespace Emby.Server.Implementations public bool CoreStartupHasCompleted { get; private set; } + /// <inheritdoc /> + public Uri PublishedServerUrl => _startupOptions.PublishedServerUrl; + public virtual bool CanLaunchWebBrowser { get diff --git a/MediaBrowser.Controller/IServerApplicationHost.cs b/MediaBrowser.Controller/IServerApplicationHost.cs index 92b2d43ce..6378625e8 100644 --- a/MediaBrowser.Controller/IServerApplicationHost.cs +++ b/MediaBrowser.Controller/IServerApplicationHost.cs @@ -53,6 +53,11 @@ namespace MediaBrowser.Controller string FriendlyName { get; } /// <summary> + /// Gets the configured published server url. + /// </summary> + Uri PublishedServerUrl { get; } + + /// <summary> /// Gets the system info. /// </summary> /// <param name="source">The originator of the request.</param> |
