From 24f7516b3ea5103b4a254af1dd57e7b9833e9bb5 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Wed, 21 Jul 2010 03:13:12 +0300 Subject: [PATCH] external: Container ID isn't always its path An exception to this rule is the root container where its ID is "0" but thats not its path. --- src/plugins/external/rygel-external-container.vala | 8 +++++--- src/plugins/external/rygel-external-content-dir.vala | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/external/rygel-external-container.vala b/src/plugins/external/rygel-external-container.vala index 879bcb8..5675c85 100644 --- a/src/plugins/external/rygel-external-container.vala +++ b/src/plugins/external/rygel-external-container.vala @@ -47,6 +47,7 @@ public class Rygel.External.Container : Rygel.MediaContainer { uint child_count, bool searchable, string service_name, + string path, string host_ip, Container? parent = null) { base (id, parent, title, (int) child_count); @@ -64,7 +65,7 @@ public class Rygel.External.Container : Rygel.MediaContainer { // Create proxy to MediaContainer iface this.actual_container = this.connection.get_object (this.service_name, - id) + path) as MediaContainerProxy; this.update_container.begin (true); @@ -256,16 +257,17 @@ public class Rygel.External.Container : Rygel.MediaContainer { this.containers.clear (); foreach (var props in children_props) { - var id = props.lookup ("Path").get_string (); + var path = props.lookup ("Path").get_string (); var title = props.lookup ("DisplayName").get_string (); var child_count = props.lookup ("ChildCount").get_uint (); var searchable = props.lookup ("Searchable").get_boolean (); - var container = new Container (id, + var container = new Container (path, title, child_count, searchable, this.service_name, + path, this.host_ip, this); this.containers.add (container); diff --git a/src/plugins/external/rygel-external-content-dir.vala b/src/plugins/external/rygel-external-content-dir.vala index ae80745..98b5031 100644 --- a/src/plugins/external/rygel-external-content-dir.vala +++ b/src/plugins/external/rygel-external-content-dir.vala @@ -39,6 +39,7 @@ public class Rygel.External.ContentDir : Rygel.ContentDirectory { plugin.child_count, plugin.searchable, plugin.service_name, + plugin.root_object, this.context.host_ip, null); } -- 2.7.4