aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-30 17:49:47 +0100
committerMax Kellermann <max@duempel.org>2013-10-30 17:49:47 +0100
commit55868eecd007994188a29686cc4aea17fc1f680a (patch)
tree69ea40063f55560778803ba0edc658d9f9627f09
parent50dc98367ccb6155a15c440df5e32cf2b8b719ea (diff)
downloadmpd-55868eecd007994188a29686cc4aea17fc1f680a.tar.gz
mpd-55868eecd007994188a29686cc4aea17fc1f680a.tar.xz
mpd-55868eecd007994188a29686cc4aea17fc1f680a.zip
PlayerCommands: show CrossFade/MixRamp only if enabled
-rw-r--r--src/command/PlayerCommands.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx
index 171ffaa4f..12c71dfd4 100644
--- a/src/command/PlayerCommands.cxx
+++ b/src/command/PlayerCommands.cxx
@@ -138,9 +138,7 @@ handle_status(Client &client,
COMMAND_STATUS_CONSUME ": %i\n"
COMMAND_STATUS_PLAYLIST ": %li\n"
COMMAND_STATUS_PLAYLIST_LENGTH ": %i\n"
- COMMAND_STATUS_CROSSFADE ": %i\n"
COMMAND_STATUS_MIXRAMPDB ": %f\n"
- COMMAND_STATUS_MIXRAMPDELAY ": %f\n"
COMMAND_STATUS_STATE ": %s\n",
volume_level_get(),
playlist.GetRepeat(),
@@ -149,11 +147,19 @@ handle_status(Client &client,
playlist.GetConsume(),
(unsigned long)playlist.GetVersion(),
playlist.GetLength(),
- (int)(client.player_control.GetCrossFade() + 0.5),
client.player_control.GetMixRampDb(),
- client.player_control.GetMixRampDelay(),
state);
+ if (client.player_control.GetCrossFade() > 0)
+ client_printf(client,
+ COMMAND_STATUS_CROSSFADE ": %i\n",
+ int(client.player_control.GetCrossFade() + 0.5));
+
+ if (client.player_control.GetMixRampDelay() > 0)
+ client_printf(client,
+ COMMAND_STATUS_MIXRAMPDELAY ": %f\n",
+ client.player_control.GetMixRampDelay());
+
song = playlist.GetCurrentPosition();
if (song >= 0) {
client_printf(client,