manually add protobuf generated files

This commit is contained in:
philippe44
2023-03-27 20:16:38 -07:00
parent fc78b36c1f
commit 31184b6946
14 changed files with 1258 additions and 15 deletions

View File

@@ -67,7 +67,7 @@ void CDNTrackStream::seek(size_t newPos) {
this->position = newPos;
}
void CDNTrackStream::openStream() {
void CDNTrackStream::openStream() {
CSPOT_LOG(info, "Opening HTTP stream to %s", this->cdnUrl.c_str());
// Open connection, read first 128 bytes
@@ -102,7 +102,7 @@ void CDNTrackStream::openStream() {
this->isConnected = true;
}
size_t CDNTrackStream::readBytes(uint8_t* dst, size_t bytes) {
size_t CDNTrackStream::readBytes(uint8_t* dst, size_t bytes) {
size_t offsetPosition = position + SPOTIFY_OPUS_HEADER;
size_t actualFileSize = this->totalFileSize + SPOTIFY_OPUS_HEADER;

View File

@@ -130,12 +130,9 @@ void LoginBlob::loadUserPass(const std::string& username,
void LoginBlob::loadJson(const std::string& json) {
#ifdef BELL_ONLY_CJSON
cJSON* root = cJSON_Parse(json.c_str());
cJSON* item = cJSON_GetObjectItem(root, "authType");
this->authType = item->valueint;
item = cJSON_GetObjectItem(root, "username");
this->username = item->valuestring;
item = cJSON_GetObjectItem(root, "authData");
std::string authDataObject = item->valuestring;
this->authType = cJSON_GetObjectItem(root, "authType")->valueint;
this->username = cJSON_GetObjectItem(root, "username")->valuestring;
std::string authDataObject = cJSON_GetObjectItem(root, "authData")->valuestring;
cJSON_Delete(root);
#else
auto root = nlohmann::json::parse(json);