output/print, command/player: print bool as integer

Fixes protocol breakage after commit 0440c41cba

libfmt is too clever for the MPD protocol!

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1175
This commit is contained in:
Max Kellermann 2021-05-28 18:00:55 +02:00
parent 1f9e32c35e
commit 679b3bc00f
2 changed files with 4 additions and 4 deletions

View File

@ -144,10 +144,10 @@ handle_status(Client &client, [[maybe_unused]] Request args, Response &r)
COMMAND_STATUS_PLAYLIST_LENGTH ": {}\n" COMMAND_STATUS_PLAYLIST_LENGTH ": {}\n"
COMMAND_STATUS_MIXRAMPDB ": {}\n" COMMAND_STATUS_MIXRAMPDB ": {}\n"
COMMAND_STATUS_STATE ": {}\n"), COMMAND_STATUS_STATE ": {}\n"),
playlist.GetRepeat(), (unsigned)playlist.GetRepeat(),
playlist.GetRandom(), (unsigned)playlist.GetRandom(),
SingleToString(playlist.GetSingle()), SingleToString(playlist.GetSingle()),
playlist.GetConsume(), (unsigned)playlist.GetConsume(),
partition.name.c_str(), partition.name.c_str(),
playlist.GetVersion(), playlist.GetVersion(),
playlist.GetLength(), playlist.GetLength(),

View File

@ -40,7 +40,7 @@ printAudioDevices(Response &r, const MultipleOutputs &outputs)
"outputenabled: {}\n"), "outputenabled: {}\n"),
i, i,
ao.GetName(), ao.GetPluginName(), ao.GetName(), ao.GetPluginName(),
ao.IsEnabled()); (unsigned)ao.IsEnabled());
for (const auto &[attribute, value] : ao.GetAttributes()) for (const auto &[attribute, value] : ao.GetAttributes())
r.Fmt(FMT_STRING("attribute: {}={}\n"), r.Fmt(FMT_STRING("attribute: {}={}\n"),