[rygel] external: Update child-count after D-Bus signal



commit b41219a901b5bdbf8b60637aaaee160c06b1c5e2
Author: Jens Georg <mail jensge org>
Date:   Thu Feb 9 13:38:18 2012 +0200

    external: Update child-count after D-Bus signal
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669680

 src/plugins/external/rygel-external-container.vala |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/external/rygel-external-container.vala b/src/plugins/external/rygel-external-container.vala
index e789997..a2326c1 100644
--- a/src/plugins/external/rygel-external-container.vala
+++ b/src/plugins/external/rygel-external-container.vala
@@ -274,6 +274,22 @@ public class Rygel.External.Container : Rygel.MediaContainer,
 
     private async void update_container (bool connect_signal = false) {
         try {
+            Properties props_iface = yield Bus.get_proxy
+                                        (BusType.SESSION,
+                                         this.service_name,
+                                         this.actual_container.get_object_path (),
+                                         DBusProxyFlags.DO_NOT_LOAD_PROPERTIES);
+            var props = yield props_iface.get_all (MediaContainerProxy.IFACE);
+            var child_count = (uint) props.lookup ("ChildCount");
+            this.title = (string) props.lookup ("DisplayName");
+            this.child_count = (int) child_count;
+        } catch (GLib.Error property_error) {
+            warning ("Failed to update information about container '%s': %s",
+                     this.actual_container.get_object_path (),
+                     property_error.message);
+        }
+
+        try {
             // Update our information about the container
             yield this.refresh_child_containers ();
         } catch (GLib.Error err) {



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