Merge lp:~cjcurran/indicator-sound/mpris-interface-fail-error into lp:~indicator-applet-developers/indicator-sound/trunk_3

Proposed by Conor Curran
Status: Merged
Merged at revision: 235
Proposed branch: lp:~cjcurran/indicator-sound/mpris-interface-fail-error
Merge into: lp:~indicator-applet-developers/indicator-sound/trunk_3
Diff against target: 47 lines (+9/-8)
1 file modified
src/mpris2-controller.vala (+9/-8)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/mpris-interface-fail-error
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+55311@code.launchpad.net

Description of the change

fixes bug attached

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Looks good. Definitely removes a SIGABRT :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/mpris2-controller.vala'
--- src/mpris2-controller.vala 2011-03-21 13:04:13 +0000
+++ src/mpris2-controller.vala 2011-03-29 10:52:52 +0000
@@ -45,19 +45,19 @@
45 this.player = Bus.get_proxy_sync ( BusType.SESSION,45 this.player = Bus.get_proxy_sync ( BusType.SESSION,
46 this.owner.dbus_name,46 this.owner.dbus_name,
47 "/org/mpris/MediaPlayer2" );47 "/org/mpris/MediaPlayer2" );
48 if ( this.owner.use_playlists == true ){
49 this.playlists = Bus.get_proxy_sync ( BusType.SESSION,
50 this.owner.dbus_name,
51 "/org/mpris/MediaPlayer2" );
52 this.playlists.PlaylistChanged.connect (on_playlistdetails_changed);
53 }
54 this.properties_interface = Bus.get_proxy_sync ( BusType.SESSION,48 this.properties_interface = Bus.get_proxy_sync ( BusType.SESSION,
55 "org.freedesktop.Properties.PropertiesChanged",49 "org.freedesktop.Properties.PropertiesChanged",
56 "/org/mpris/MediaPlayer2" );50 "/org/mpris/MediaPlayer2" );
57 this.properties_interface.PropertiesChanged.connect ( property_changed_cb );51 this.properties_interface.PropertiesChanged.connect ( property_changed_cb );
52 if ( this.owner.use_playlists == true ){
53 this.playlists = Bus.get_proxy_sync ( BusType.SESSION,
54 this.owner.dbus_name,
55 "/org/mpris/MediaPlayer2" );
56 this.playlists.PlaylistChanged.connect (on_playlistdetails_changed);
57 }
58 }58 }
59 catch (IOError e) {59 catch (IOError e) {
60 error("Problems connecting to the session bus - %s", e.message);60 critical("Problems connecting to the session bus - %s", e.message);
61 }61 }
62 }62 }
6363
@@ -68,7 +68,7 @@
68 //debug("properties-changed for interface %s and owner %s", interface_source, this.owner.dbus_name);68 //debug("properties-changed for interface %s and owner %s", interface_source, this.owner.dbus_name);
69 if ( changed_properties == null ||69 if ( changed_properties == null ||
70 interface_source.has_prefix ( MPRIS_PREFIX ) == false ){70 interface_source.has_prefix ( MPRIS_PREFIX ) == false ){
71 warning("Property-changed hash is null or this is an interface that doesn't concerns us");71 warning("Property-changed hash is null or this is an interface that doesn't concern us");
72 return;72 return;
73 }73 }
74 Variant? play_v = changed_properties.lookup("PlaybackStatus");74 Variant? play_v = changed_properties.lookup("PlaybackStatus");
@@ -124,6 +124,7 @@
124 private GLib.HashTable<string, Variant?>? clean_metadata()124 private GLib.HashTable<string, Variant?>? clean_metadata()
125 { 125 {
126 GLib.HashTable<string, Variant?> changed_updates = this.player.Metadata; 126 GLib.HashTable<string, Variant?> changed_updates = this.player.Metadata;
127
127 Variant? artist_v = this.player.Metadata.lookup("xesam:artist");128 Variant? artist_v = this.player.Metadata.lookup("xesam:artist");
128 if(artist_v != null){129 if(artist_v != null){
129 Variant? v_artists = this.player.Metadata.lookup("xesam:artist");130 Variant? v_artists = this.player.Metadata.lookup("xesam:artist");

Subscribers

People subscribed via source and target branches