client/Response: add method Fmt() based on libfmt

This commit is contained in:
Max Kellermann
2021-05-21 20:35:29 +02:00
parent a9c704b76e
commit 0440c41cba
27 changed files with 241 additions and 195 deletions

View File

@@ -37,6 +37,8 @@
#include "util/MimeType.hxx"
#include "util/UriExtract.hxx"
#include <fmt/format.h>
class GetChromaprintCommand final
: public ThreadBackgroundCommand, ChromaprintDecoderClient, InputStreamHandler
{
@@ -60,8 +62,8 @@ protected:
void Run() override;
void SendResponse(Response &r) noexcept override {
r.Format("chromaprint: %s\n",
GetFingerprint().c_str());
r.Fmt(FMT_STRING("chromaprint: {}\n"),
GetFingerprint());
}
void CancelThread() noexcept override {