command/player, ...: use decimal notation

During the libfmt migration, I converted "%1.3f" to just "{:1.3}"
without the "f" suffix, but libfmt defaults to scientific notation,
which can break some MPD clients.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1291
This commit is contained in:
Max Kellermann
2021-10-18 16:52:58 +02:00
parent d5be8c74b0
commit b22d7218aa
5 changed files with 12 additions and 10 deletions

View File

@@ -60,7 +60,7 @@ tag_print(Response &r, const Tag &tag) noexcept
{
if (!tag.duration.IsNegative())
r.Fmt(FMT_STRING("Time: {}\n"
"duration: {:1.3}\n"),
"duration: {:1.3f}\n"),
tag.duration.RoundS(),
tag.duration.ToDoubleS());