diff options
author | Ted Gould <ted@gould.cx> | 2014-09-23 10:14:54 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-09-23 10:14:54 -0500 |
commit | 68207ed12f5df6eb81b7d3565aed7acc15f82f54 (patch) | |
tree | 42695679a78a13688ec0cf3ecacc57a714c44a1f /src/service.vala | |
parent | 5bac1dc620f1499b6b2bf9d4b0371a5f2e530696 (diff) | |
download | ayatana-indicator-sound-68207ed12f5df6eb81b7d3565aed7acc15f82f54.tar.gz ayatana-indicator-sound-68207ed12f5df6eb81b7d3565aed7acc15f82f54.tar.bz2 ayatana-indicator-sound-68207ed12f5df6eb81b7d3565aed7acc15f82f54.zip |
Build in a way to stop the track information for getting into the player action
Diffstat (limited to 'src/service.vala')
-rw-r--r-- | src/service.vala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/service.vala b/src/service.vala index 4e02769..ae1840a 100644 --- a/src/service.vala +++ b/src/service.vala @@ -379,11 +379,11 @@ public class IndicatorSound.Service: Object { this.loop.quit (); } - Variant action_state_for_player (MediaPlayer player) { + Variant action_state_for_player (MediaPlayer player, bool show_track = true) { var builder = new VariantBuilder (new VariantType ("a{sv}")); builder.add ("{sv}", "running", new Variant ("b", player.is_running)); builder.add ("{sv}", "state", new Variant ("s", player.state)); - if (player.current_track != null) { + if (player.current_track != null && show_track) { builder.add ("{sv}", "title", new Variant ("s", player.current_track.title)); builder.add ("{sv}", "artist", new Variant ("s", player.current_track.artist)); builder.add ("{sv}", "album", new Variant ("s", player.current_track.album)); |