The Free Software Media System - Server Backend & API
xbox 360 dlna fixes
Luke Pulverenti31f137500d3f
diff --git a/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs b/MediaBrowser.Dlna/Profiles/Xbox360Profile.csindex 431807aedd..64b728721b 100644--- a/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs+++ b/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs@@ -14,7 +14,7 @@ namespace MediaBrowser.Dlna.ProfilesName = "Xbox 360";// Required according to above- ModelName = "Windows Media Connect";+ ModelName = "Windows Media Player Sharing";ModelNumber = "12.0";@@ -25,7 +25,6 @@ namespace MediaBrowser.Dlna.ProfilesManufacturerUrl = "http://www.microsoft.com";XDlnaDoc = "DMS-1.50";ModelDescription = "Emby : UPnP Media Server";- ModelNumber = "001";TimelineOffsetSeconds = 40;RequiresPlainFolders = true;diff --git a/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml b/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xmlindex bfe1fceea0..35799f313c 100644--- a/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml+++ b/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml@@ -11,9 +11,9 @@<FriendlyName>${HostName}: 1</FriendlyName><Manufacturer>Microsoft Corporation</Manufacturer><ManufacturerUrl>http://www.microsoft.com</ManufacturerUrl>- <ModelName>Windows Media Connect</ModelName>+ <ModelName>Windows Media Player Sharing</ModelName><ModelDescription>Emby : UPnP Media Server</ModelDescription>- <ModelNumber>001</ModelNumber>+ <ModelNumber>12.0</ModelNumber><ModelUrl>http://go.microsoft.com/fwlink/?LinkId=105926</ModelUrl><EnableAlbumArtInDidl>false</EnableAlbumArtInDidl><EnableSingleAlbumArtLimit>false</EnableSingleAlbumArtLimit>diff --git a/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs b/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.csindex 649612e1e4..63ea59d530 100644--- a/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs+++ b/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs@@ -92,10 +92,7 @@ namespace MediaBrowser.Dlna.Serverbuilder.Append("<device>");AppendDeviceProperties(builder);- if (_profile.EnableDlnaProtocol)- {- AppendIconList(builder);- }+ AppendIconList(builder);AppendServiceList(builder);builder.Append("</device>");}@@ -111,6 +108,13 @@ namespace MediaBrowser.Dlna.Serverbuilder.Append("<dlna:X_DLNADOC xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">M-DMS-1.50</dlna:X_DLNADOC>");builder.Append("<dlna:X_DLNADOC xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">" + SecurityElement.Escape(_profile.XDlnaDoc ?? string.Empty) + "</dlna:X_DLNADOC>");}+ else+ {+ builder.Append("<dlna:X_DLNACAP>" + SecurityElement.Escape(_profile.XDlnaCap ?? string.Empty) + "</dlna:X_DLNACAP>");++ builder.Append("<dlna:X_DLNADOC>" + SecurityElement.Escape(_profile.XDlnaDoc ?? string.Empty) + "</dlna:X_DLNADOC>");+ builder.Append("<dlna:X_DLNADOC>M-DMS-1.50</dlna:X_DLNADOC>");+ }builder.Append("<friendlyName>" + SecurityElement.Escape(GetFriendlyName()) + "</friendlyName>");builder.Append("<manufacturer>" + SecurityElement.Escape(_profile.Manufacturer ?? string.Empty) + "</manufacturer>");diff --git a/MediaBrowser.Server.Implementations/HttpServer/ResponseFilter.cs b/MediaBrowser.Server.Implementations/HttpServer/ResponseFilter.csindex 0da34efc67..4ef9d52774 100644--- a/MediaBrowser.Server.Implementations/HttpServer/ResponseFilter.cs+++ b/MediaBrowser.Server.Implementations/HttpServer/ResponseFilter.cs@@ -58,7 +58,10 @@ namespace MediaBrowser.Server.Implementations.HttpServerif (hasOptions != null){- hasOptions.Options["Server"] = "Mono-HTTPAPI/1.1";+ if (!hasOptions.Options.ContainsKey("Server"))+ {+ hasOptions.Options["Server"] = "Mono-HTTPAPI/1.1, UPnP/1.0 DLNADOC/1.50";+ }// Content length has to be explicitly set on on HttpListenerResponse or it won't be happystring contentLength;