diff --git a/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs b/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs
index 96c9535ab..649612e1e 100644
--- a/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs
+++ b/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs
@@ -54,11 +54,14 @@ namespace MediaBrowser.Dlna.Server
var attributes = _profile.XmlRootAttributes.ToList();
- attributes.Insert(0, new XmlAttribute
+ if (_profile.EnableDlnaProtocol)
{
- Name = "xmlns:dlna",
- Value = "urn:schemas-dlna-org:device-1-0"
- });
+ attributes.Insert(0, new XmlAttribute
+ {
+ Name = "xmlns:dlna",
+ Value = "urn:schemas-dlna-org:device-1-0"
+ });
+ }
attributes.Insert(0, new XmlAttribute
{
Name = "xmlns",
@@ -89,27 +92,32 @@ namespace MediaBrowser.Dlna.Server
builder.Append("");
AppendDeviceProperties(builder);
- AppendIconList(builder);
+ if (_profile.EnableDlnaProtocol)
+ {
+ AppendIconList(builder);
+ }
AppendServiceList(builder);
builder.Append("");
}
private void AppendDeviceProperties(StringBuilder builder)
{
- builder.Append("uuid:" + SecurityElement.Escape(_serverUdn) + "");
+ builder.Append("urn:schemas-upnp-org:device:MediaServer:1");
- builder.Append("" + SecurityElement.Escape(_profile.XDlnaCap ?? string.Empty) + "");
+ if (_profile.EnableDlnaProtocol)
+ {
+ builder.Append("" + SecurityElement.Escape(_profile.XDlnaCap ?? string.Empty) + "");
- builder.Append("M-DMS-1.50");
- builder.Append("" + SecurityElement.Escape(_profile.XDlnaDoc ?? string.Empty) + "");
+ builder.Append("M-DMS-1.50");
+ builder.Append("" + SecurityElement.Escape(_profile.XDlnaDoc ?? string.Empty) + "");
+ }
builder.Append("" + SecurityElement.Escape(GetFriendlyName()) + "");
- builder.Append("urn:schemas-upnp-org:device:MediaServer:1");
builder.Append("" + SecurityElement.Escape(_profile.Manufacturer ?? string.Empty) + "");
builder.Append("" + SecurityElement.Escape(_profile.ManufacturerUrl ?? string.Empty) + "");
- builder.Append("" + SecurityElement.Escape(_profile.ModelName ?? string.Empty) + "");
builder.Append("" + SecurityElement.Escape(_profile.ModelDescription ?? string.Empty) + "");
+ builder.Append("" + SecurityElement.Escape(_profile.ModelName ?? string.Empty) + "");
builder.Append("" + SecurityElement.Escape(_profile.ModelNumber ?? string.Empty) + "");
builder.Append("" + SecurityElement.Escape(_profile.ModelUrl ?? string.Empty) + "");
@@ -123,6 +131,7 @@ namespace MediaBrowser.Dlna.Server
builder.Append("" + SecurityElement.Escape(_profile.SerialNumber) + "");
}
+ builder.Append("uuid:" + SecurityElement.Escape(_serverUdn) + "");
builder.Append("" + SecurityElement.Escape(_serverAddress) + "");
if (!EnableAbsoluteUrls)