mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-30 06:32:36 +00:00
Distinguish between win32 and win64 in HttpClient's user agent.
This commit is contained in:
parent
fbbaea0beb
commit
b445db5752
@ -5,9 +5,11 @@
|
||||
* fixed a bug that was preventing the update check from displaying a dialog on
|
||||
completion.
|
||||
* fixed now playing readout ellipsizing.
|
||||
* fixed a bug where last.fm scrobbles may get posted twice per track.
|
||||
* added a hotkey to clear the play queue; press 'shift+x' in the play queue
|
||||
* fixed a bug where `last.fm` scrobbles may get posted twice per track.
|
||||
* added a hotkey to clear the play queue; press `shift+x` in the play queue
|
||||
window.
|
||||
* fixed `HttpClient` user agent to distinguish between `win32` and `win64`
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
0.96.2
|
||||
|
@ -106,7 +106,7 @@ namespace musik { namespace core { namespace sdk {
|
||||
HttpHeaders requestHeaders, responseHeaders;
|
||||
HeaderCallback headersCb;
|
||||
DecoratorCallback decoratorCb;
|
||||
CanceledCallback canceledCallback;
|
||||
CanceledCallback canceledCb;
|
||||
bool cancel;
|
||||
Thread mode{ Thread::Background };
|
||||
HttpMethod method{ HttpMethod::Get };
|
||||
@ -115,7 +115,9 @@ namespace musik { namespace core { namespace sdk {
|
||||
|
||||
template <typename T>
|
||||
std::string HttpClient<T>::DefaultUserAgent() {
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN64
|
||||
static const std::string PLATFORM = "win64";
|
||||
#elif WIN32
|
||||
static const std::string PLATFORM = "win32";
|
||||
#elif defined __APPLE__
|
||||
static const std::string PLATFORM = "macos";
|
||||
@ -316,8 +318,8 @@ namespace musik { namespace core { namespace sdk {
|
||||
curl_easy_getinfo(this->curl, CURLINFO_RESPONSE_CODE, &httpStatus);
|
||||
|
||||
if (this->cancel) {
|
||||
if (this->canceledCallback) {
|
||||
this->canceledCallback(this);
|
||||
if (this->canceledCb) {
|
||||
this->canceledCb(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,9 @@
|
||||
namespace musik {
|
||||
namespace cube {
|
||||
static inline std::string userAgent() {
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN64
|
||||
static const std::string PLATFORM = "win64";
|
||||
#elif WIN32
|
||||
static const std::string PLATFORM = "win32";
|
||||
#elif defined __APPLE__
|
||||
static const std::string PLATFORM = "macos";
|
||||
|
@ -61,7 +61,9 @@ static const std::string MINOR = "minor";
|
||||
static const std::string PATCH = "patch";
|
||||
static const std::string URL = "url";
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN64
|
||||
static const std::string PLATFORM = "win64";
|
||||
#elif WIN32
|
||||
static const std::string PLATFORM = "win32";
|
||||
#elif defined __APPLE__
|
||||
static const std::string PLATFORM = "macos";
|
||||
|
Loading…
x
Reference in New Issue
Block a user