[rygel] core: Fake Windows Media Player 11 for XBox 360



commit 6a4eb315bbc236b9845e3d85fad35437a90b6407
Author: Jens Georg <mail jensge org>
Date:   Sat May 7 18:59:09 2011 +0200

    core: Fake Windows Media Player 11 for XBox 360
    
    This also enables us to drop the ugly postfix on the friendly name.

 src/rygel/rygel-xbox-hacks.vala |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/rygel/rygel-xbox-hacks.vala b/src/rygel/rygel-xbox-hacks.vala
index ae4451f..8899d55 100644
--- a/src/rygel/rygel-xbox-hacks.vala
+++ b/src/rygel/rygel-xbox-hacks.vala
@@ -32,9 +32,9 @@ internal class Rygel.XBoxHacks : GLib.Object {
     private static string AGENT = ".*Xbox.*|.*Allegro-Software-WebClient.*";
     private static string DMS = "urn:schemas-upnp-org:device:MediaServer";
     private static string DMS_V1 = DMS + ":1";
-    private static string FRIENDLY_NAME_POSTFIX =
-                                        ": 1 : Windows Media Connect";
-    private static string MODEL_NAME = "Windows Media Connect";
+    private static string FRIENDLY_NAME_POSTFIX = ":";
+    private static string MODEL_NAME = "Windows Media Player Sharing";
+    private static string MODEL_VERSION = "11";
 
     public XBoxHacks.for_action (ServiceAction action) throws XBoxHacksError {
         unowned MessageHeaders headers = action.get_message ().request_headers;
@@ -131,6 +131,14 @@ internal class Rygel.XBoxHacks : GLib.Object {
         element = XMLUtils.get_element ((Xml.Node *) doc,
                                         "root",
                                         "device",
+                                        "modelNumber");
+
+        assert (element != null);
+        element->set_content (MODEL_VERSION);
+
+        element = XMLUtils.get_element ((Xml.Node *) doc,
+                                        "root",
+                                        "device",
                                         "friendlyName");
         assert (element != null);
         element->add_content (FRIENDLY_NAME_POSTFIX);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]