From d34f1878510f6f23a0e238e359d0e057f2991908 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Sun, 9 Jan 2011 14:30:40 +0000 Subject: commit on the pain caused by that banshe mpris peculiarity --- src/mpris2-watcher.vala | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/mpris2-watcher.vala') diff --git a/src/mpris2-watcher.vala b/src/mpris2-watcher.vala index b30aa88..9ef9b2f 100644 --- a/src/mpris2-watcher.vala +++ b/src/mpris2-watcher.vala @@ -111,7 +111,7 @@ public class Mpris2Watcher : GLib.Object else if (previous_owner == "" && current_owner != "") { debug ("Client '%s' has appeared", name); bool use_playlists = this.supports_playlists ( name ); - client_appeared (mpris2_root.DesktopEntry, name, false/*use_playlists*/); + client_appeared (mpris2_root.DesktopEntry, name, use_playlists); } } @@ -134,7 +134,14 @@ public class Mpris2Watcher : GLib.Object private bool supports_playlists ( string name ) { try { - debug( "name = %s", name); + /* The dbusproxy flag parameter is needed to ensure Banshee does not + blow up. I suspect the issue is that if you + try to instantiate a dbus object which does not have any properties + associated with it, gdbus will attempt to fetch the properties (this is + in the documentation) but the banshee mpris dbus object more than likely + causes a crash because it doesn't check for the presence of properties + before attempting to access them. + */ this.introspectable = Bus.get_proxy_sync ( BusType.SESSION, name, MPRIS_MEDIA_PLAYER_PATH, -- cgit v1.2.3