diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-04-04 10:20:54 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-04-04 10:20:54 -0400 |
commit | 1f8270d3e11c19c6b3068ebfc151a258dcf83ef1 (patch) | |
tree | e605c20712389e49b34d39fd37a979f6b80a3fe0 /src/mpris2-controller.vala | |
parent | c3c9a16799eee97e45f445e09fb5977cb843eed6 (diff) | |
parent | ab30eadeaaee5ba003feaa5207c77820cc021684 (diff) | |
download | ayatana-indicator-sound-1f8270d3e11c19c6b3068ebfc151a258dcf83ef1.tar.gz ayatana-indicator-sound-1f8270d3e11c19c6b3068ebfc151a258dcf83ef1.tar.bz2 ayatana-indicator-sound-1f8270d3e11c19c6b3068ebfc151a258dcf83ef1.zip |
releasing version 0.6.6.1-0ubuntu1
Diffstat (limited to 'src/mpris2-controller.vala')
-rw-r--r-- | src/mpris2-controller.vala | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala index 94c52c0..04ceb88 100644 --- a/src/mpris2-controller.vala +++ b/src/mpris2-controller.vala @@ -45,19 +45,19 @@ public class Mpris2Controller : GLib.Object this.player = Bus.get_proxy_sync ( BusType.SESSION, this.owner.dbus_name, "/org/mpris/MediaPlayer2" ); + this.properties_interface = Bus.get_proxy_sync ( BusType.SESSION, + "org.freedesktop.Properties.PropertiesChanged", + "/org/mpris/MediaPlayer2" ); + this.properties_interface.PropertiesChanged.connect ( property_changed_cb ); if ( this.owner.use_playlists == true ){ this.playlists = Bus.get_proxy_sync ( BusType.SESSION, this.owner.dbus_name, "/org/mpris/MediaPlayer2" ); this.playlists.PlaylistChanged.connect (on_playlistdetails_changed); } - this.properties_interface = Bus.get_proxy_sync ( BusType.SESSION, - "org.freedesktop.Properties.PropertiesChanged", - "/org/mpris/MediaPlayer2" ); - this.properties_interface.PropertiesChanged.connect ( property_changed_cb ); } catch (IOError e) { - error("Problems connecting to the session bus - %s", e.message); + critical("Problems connecting to the session bus - %s", e.message); } } @@ -68,7 +68,7 @@ public class Mpris2Controller : GLib.Object //debug("properties-changed for interface %s and owner %s", interface_source, this.owner.dbus_name); if ( changed_properties == null || interface_source.has_prefix ( MPRIS_PREFIX ) == false ){ - warning("Property-changed hash is null or this is an interface that doesn't concerns us"); + warning("Property-changed hash is null or this is an interface that doesn't concern us"); return; } Variant? play_v = changed_properties.lookup("PlaybackStatus"); @@ -124,6 +124,7 @@ public class Mpris2Controller : GLib.Object private GLib.HashTable<string, Variant?>? clean_metadata() { GLib.HashTable<string, Variant?> changed_updates = this.player.Metadata; + Variant? artist_v = this.player.Metadata.lookup("xesam:artist"); if(artist_v != null){ Variant? v_artists = this.player.Metadata.lookup("xesam:artist"); |