aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/PlayerCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-25 17:46:43 +0100
committerMax Kellermann <max@duempel.org>2014-11-25 17:46:43 +0100
commit70b5a81a290e5f483e93c59413d5bd29d2047063 (patch)
tree934934174959613ad3cb5f04a3ecacde3c29319c /src/command/PlayerCommands.cxx
parent83fd822e8b9a4dd1132a2cec324c4171d8ca2946 (diff)
downloadmpd-70b5a81a290e5f483e93c59413d5bd29d2047063.tar.gz
mpd-70b5a81a290e5f483e93c59413d5bd29d2047063.tar.xz
mpd-70b5a81a290e5f483e93c59413d5bd29d2047063.zip
{Tag,Song}Print, PlayerCommands: report song duration with milliseconds precision
Diffstat (limited to 'src/command/PlayerCommands.cxx')
-rw-r--r--src/command/PlayerCommands.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx
index cd7f42289..a320fb6ba 100644
--- a/src/command/PlayerCommands.cxx
+++ b/src/command/PlayerCommands.cxx
@@ -182,6 +182,10 @@ handle_status(Client &client,
player_status.elapsed_time.ToDoubleS(),
player_status.bit_rate);
+ if (!player_status.total_time.IsNegative())
+ client_printf(client, "duration: %1.3f\n",
+ player_status.total_time.ToDoubleS());
+
if (player_status.audio_format.IsDefined()) {
struct audio_format_string af_string;