[rygel/rygel-0-10] core: Fix regression on downgrade for Allegro



commit 455d59fb888dacd742fa86ff964f7a9042c93b2b
Author: Jens Georg <mail jensge org>
Date:   Tue Jul 12 16:37:13 2011 +0200

    core: Fix regression on downgrade for Allegro
    
    Conflicts:
    
    	src/rygel/rygel-xbox-hacks.vala

 src/rygel/rygel-browse.vala     |    2 +-
 src/rygel/rygel-xbox-hacks.vala |   10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-browse.vala b/src/rygel/rygel-browse.vala
index 8384636..b45f5d0 100644
--- a/src/rygel/rygel-browse.vala
+++ b/src/rygel/rygel-browse.vala
@@ -40,7 +40,7 @@ internal class Rygel.Browse: Rygel.MediaQueryAction {
         base (content_dir, action);
 
         if (this.xbox_hacks != null) {
-            this.object_id_arg = "ContainerID";
+            this.object_id_arg = this.xbox_hacks.object_id;
         } else {
             this.object_id_arg = "ObjectID";
         }
diff --git a/src/rygel/rygel-xbox-hacks.vala b/src/rygel/rygel-xbox-hacks.vala
index ac925df..bf8a34a 100644
--- a/src/rygel/rygel-xbox-hacks.vala
+++ b/src/rygel/rygel-xbox-hacks.vala
@@ -35,6 +35,10 @@ internal class Rygel.XBoxHacks : GLib.Object {
     private static string FRIENDLY_NAME_POSTFIX =
                                         ": 1 : Windows Media Connect";
     private static string MODEL_NAME = "Windows Media Connect";
+    private static string CONTAINER_ID = "ContainerID";
+    private static string OBJECT_ID = "ObjectID";
+
+    public unowned string object_id { get; private set; }
 
     public XBoxHacks.for_action (ServiceAction action) throws XBoxHacksError {
         unowned MessageHeaders headers = action.get_message ().request_headers;
@@ -43,6 +47,12 @@ internal class Rygel.XBoxHacks : GLib.Object {
             !(agent.contains ("Allegro-Software-WebClient"))) {
             throw new XBoxHacksError.NA (_("Not Applicable"));
         }
+
+        if (agent.contains ("Xbox")) {
+            this.object_id = CONTAINER_ID;
+        } else {
+            this.object_id = OBJECT_ID;
+        }
     }
 
     public void apply_on_device (RootDevice device,



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