The Free Software Media System - Server Backend & API
Fixed baseurl in dlna.
Greenback5224200e8cb1
diff --git a/Emby.Dlna/Server/DescriptionXmlBuilder.cs b/Emby.Dlna/Server/DescriptionXmlBuilder.csindex bca9e81cd0..09525aae4e 100644--- a/Emby.Dlna/Server/DescriptionXmlBuilder.cs+++ b/Emby.Dlna/Server/DescriptionXmlBuilder.cs@@ -40,8 +40,6 @@ namespace Emby.Dlna.Server_serverId = serverId;}- private static bool EnableAbsoluteUrls => false;-public string GetXml(){var builder = new StringBuilder();@@ -75,13 +73,6 @@ namespace Emby.Dlna.Serverbuilder.Append("<minor>0</minor>");builder.Append("</specVersion>");- if (!EnableAbsoluteUrls)- {- builder.Append("<URLBase>")- .Append(SecurityElement.Escape(_serverAddress))- .Append("</URLBase>");- }-AppendDeviceInfo(builder);builder.Append("</root>");@@ -257,14 +248,7 @@ namespace Emby.Dlna.Serverreturn string.Empty;}- url = url.TrimStart('/');-- url = "/dlna/" + _serverUdn + "/" + url;-- if (EnableAbsoluteUrls)- {- url = _serverAddress.TrimEnd('/') + url;- }+ url = _serverAddress.TrimEnd('/') + "/dlna/" + _serverUdn + "/" + url.TrimStart('/');return SecurityElement.Escape(url);}diff --git a/Jellyfin.Api/Controllers/DlnaServerController.cs b/Jellyfin.Api/Controllers/DlnaServerController.csindex 4e6455eaa7..4fd9c2fbf6 100644--- a/Jellyfin.Api/Controllers/DlnaServerController.cs+++ b/Jellyfin.Api/Controllers/DlnaServerController.cs@@ -252,7 +252,7 @@ namespace Jellyfin.Api.Controllersprivate string GetAbsoluteUri(){- return $"{Request.Scheme}://{Request.Host}{Request.Path}";+ return $"{Request.Scheme}://{Request.Host}{Request.PathBase}{Request.Path}";}private Task<ControlResponse> ProcessControlRequestInternalAsync(string id, Stream requestStream, IUpnpService service)