aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-07-12 18:41:15 +0200
committerMax Kellermann <max@duempel.org>2014-07-12 18:41:15 +0200
commit071d05465a109afa0781ce829bec3ff5ed3150e9 (patch)
tree23730faea58f3b6dce1bbca44314589c5191ff29 /src
parent11a9536271d0129539e3fbea6a9f852d02a2b6d6 (diff)
downloadmpd-071d05465a109afa0781ce829bec3ff5ed3150e9.tar.gz
mpd-071d05465a109afa0781ce829bec3ff5ed3150e9.tar.xz
mpd-071d05465a109afa0781ce829bec3ff5ed3150e9.zip
SongPrint: use DetachedSong::GetDuration()
Fixes the bogus duration of the last track in a CUE sheet.
Diffstat (limited to 'src')
-rw-r--r--src/SongPrint.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/SongPrint.cxx b/src/SongPrint.cxx
index f607fc151..c2501d037 100644
--- a/src/SongPrint.cxx
+++ b/src/SongPrint.cxx
@@ -114,5 +114,9 @@ song_print_info(Client &client, const DetachedSong &song, bool base)
if (song.GetLastModified() > 0)
time_print(client, "Last-Modified", song.GetLastModified());
- tag_print(client, song.GetTag());
+ tag_print_values(client, song.GetTag());
+
+ double duration = song.GetDuration();
+ if (duration >= 0)
+ client_printf(client, "Time: %u\n", unsigned(duration + 0.5));
}