diff --git a/src/SongPrint.cxx b/src/SongPrint.cxx index dc05bed53..939ed8f1c 100644 --- a/src/SongPrint.cxx +++ b/src/SongPrint.cxx @@ -24,6 +24,7 @@ #include "TagPrint.hxx" #include "client/Response.hxx" #include "fs/Traits.hxx" +#include "lib/fmt/AudioFormatFormatter.hxx" #include "time/ChronoUtil.hxx" #include "util/StringBuffer.hxx" #include "util/UriUtil.hxx" @@ -93,7 +94,7 @@ song_print_info(Response &r, const LightSong &song, bool base) noexcept time_print(r, "Last-Modified", song.mtime); if (song.audio_format.IsDefined()) - r.Fmt(FMT_STRING("Format: {}\n"), ToString(song.audio_format)); + r.Fmt(FMT_STRING("Format: {}\n"), song.audio_format); tag_print_values(r, song.tag); @@ -116,7 +117,7 @@ song_print_info(Response &r, const DetachedSong &song, bool base) noexcept time_print(r, "Last-Modified", song.GetLastModified()); if (const auto &f = song.GetAudioFormat(); f.IsDefined()) - r.Fmt(FMT_STRING("Format: {}\n"), ToString(f)); + r.Fmt(FMT_STRING("Format: {}\n"), f); tag_print_values(r, song.GetTag()); diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx index d72949af6..838ef818f 100644 --- a/src/command/PlayerCommands.cxx +++ b/src/command/PlayerCommands.cxx @@ -28,6 +28,7 @@ #include "Partition.hxx" #include "Instance.hxx" #include "IdleFlags.hxx" +#include "lib/fmt/AudioFormatFormatter.hxx" #include "util/StringBuffer.hxx" #include "util/ScopeExit.hxx" #include "util/Exception.hxx" @@ -185,7 +186,7 @@ handle_status(Client &client, [[maybe_unused]] Request args, Response &r) if (player_status.audio_format.IsDefined()) r.Fmt(FMT_STRING(COMMAND_STATUS_AUDIO ": {}\n"), - ToString(player_status.audio_format)); + player_status.audio_format); } #ifdef ENABLE_DATABASE