diff --git a/Emby.Dlna/Server/DescriptionXmlBuilder.cs b/Emby.Dlna/Server/DescriptionXmlBuilder.cs
index bca9e81cd..1f429d0de 100644
--- a/Emby.Dlna/Server/DescriptionXmlBuilder.cs
+++ b/Emby.Dlna/Server/DescriptionXmlBuilder.cs
@@ -235,13 +235,13 @@ namespace Emby.Dlna.Server
.Append(SecurityElement.Escape(service.ServiceId ?? string.Empty))
.Append("");
builder.Append("")
- .Append(BuildUrl(service.ScpdUrl))
+ .Append(BuildUrl(service.ScpdUrl, true))
.Append("");
builder.Append("")
- .Append(BuildUrl(service.ControlUrl))
+ .Append(BuildUrl(service.ControlUrl, true))
.Append("");
builder.Append("")
- .Append(BuildUrl(service.EventSubUrl))
+ .Append(BuildUrl(service.EventSubUrl, true))
.Append("");
builder.Append("");
@@ -250,7 +250,13 @@ namespace Emby.Dlna.Server
builder.Append("");
}
- private string BuildUrl(string url)
+ ///
+ /// Builds a valid url for inclusion in the xml.
+ ///
+ /// Url to include.
+ /// Optional. When set to true, the absolute url is always used.
+ /// The url to use for the element.
+ private string BuildUrl(string url, bool absoluteUrl = false)
{
if (string.IsNullOrEmpty(url))
{
@@ -261,7 +267,7 @@ namespace Emby.Dlna.Server
url = "/dlna/" + _serverUdn + "/" + url;
- if (EnableAbsoluteUrls)
+ if (EnableAbsoluteUrls || absoluteUrl)
{
url = _serverAddress.TrimEnd('/') + url;
}