Add user agent to curl requests

This commit is contained in:
Megamouse
2026-06-18 15:54:22 +02:00
parent 5ee92d2e6c
commit 0735c55bfd
6 changed files with 64 additions and 27 deletions
+7 -9
View File
@@ -24,29 +24,27 @@ namespace utils
return (m_hi << 24) | (m_mid << 16) | (m_lo << 8) | ((uint(m_type) & 0xf) << 4) | (m_type_index & 0xf);
}
std::string version::to_string() const
std::string version::to_string(bool simple) const
{
std::string version = std::to_string(hi()) + "." + std::to_string(mid());
std::string version = fmt::format("%d.%d", hi(), mid());
if (lo())
{
version += '.';
version += std::to_string(lo());
fmt::append(version, ".%d", lo());
}
if (type() != version_type::release)
if (!simple && type() != version_type::release)
{
if (!postfix().empty())
{
version += "-" + postfix();
fmt::append(version, "-%s", postfix());
}
version += ' ';
version += utils::to_string(type());
fmt::append(version, " %s", utils::to_string(type()));
if (type_index() > 1)
{
version += " " + std::to_string(type_index());
fmt::append(version, " %d", type_index());
}
}