[rygel] core: Revive lost XBox hacks



commit 83ce16df8bded7bed72998aadf62654c9c49750a
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Jul 23 18:30:40 2010 +0300

    core: Revive lost XBox hacks
    
    These hacks were accidently lost in 67809c22.

 src/rygel/rygel-media-query-action.vala |    2 +-
 src/rygel/rygel-xbox-hacks.vala         |   18 ++++++++++++------
 2 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/src/rygel/rygel-media-query-action.vala b/src/rygel/rygel-media-query-action.vala
index 266950c..a5e51af 100644
--- a/src/rygel/rygel-media-query-action.vala
+++ b/src/rygel/rygel-media-query-action.vala
@@ -129,7 +129,7 @@ internal abstract class Rygel.MediaQueryAction : GLib.Object, StateMachine {
         }
 
         if (this.xbox_hacks != null) {
-            this.xbox_hacks.translate_container_id (ref this.object_id);
+            this.xbox_hacks.translate_container_id (this, ref this.object_id);
         }
     }
 
diff --git a/src/rygel/rygel-xbox-hacks.vala b/src/rygel/rygel-xbox-hacks.vala
index c55315c..df4cee2 100644
--- a/src/rygel/rygel-xbox-hacks.vala
+++ b/src/rygel/rygel-xbox-hacks.vala
@@ -60,12 +60,18 @@ internal class Rygel.XBoxHacks : GLib.Object {
         device.context.host_path_for_agent (desc_path, server_path, regex);
     }
 
-    public void translate_container_id (ref string container_id) {
-        if (container_id == "1" ||
-            container_id == "4" ||
-            container_id == "5" ||
-            container_id == "6" ||
-            container_id == "7") {
+    public void translate_container_id (MediaQueryAction action,
+                                        ref string       container_id) {
+        if (action is Search &&
+            (container_id == "1" ||
+             container_id == "4" ||
+             container_id == "5" ||
+             container_id == "6" ||
+             container_id == "7") ||
+            (action is Browse &&
+             container_id == "15" ||
+             container_id == "14" ||
+             container_id == "16")) {
             container_id = "0";
         }
     }



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