2020-11-15 14:48:12 +01:00
|
|
|
#include "brprovidervl.h"
|
2020-11-03 15:56:43 +01:00
|
|
|
|
|
|
|
BRProviderVl::BRProviderVl(QObject *parent) : BRProvider(parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
BRWidget::BRWidgetStatusCode BRProviderVl::getWidgetData(BRCalendar::BRCalendarData* calendarData)
|
|
|
|
{
|
|
|
|
// load some data
|
|
|
|
QString requestUrl = "https://ifsc.results.info/api/v1/";
|
2022-10-24 10:07:39 +02:00
|
|
|
QVariantMap ret = this->serverRequest(QUrl(requestUrl), {{"x-auth-token", "cc7375f680648e7e6171e035e70351eb"}, {"Referer", "https://ifsc.results.info/"}});
|
2020-11-03 15:56:43 +01:00
|
|
|
|
|
|
|
if(ret["status"] != 200){
|
|
|
|
// request was a failure
|
|
|
|
return BRWidget::BRWidgetStatusCode(ret["status"].toInt());
|
|
|
|
}
|
|
|
|
|
|
|
|
QVariantMap data = QJsonDocument::fromJson(ret["text"].toString().toUtf8()).toVariant().toMap();
|
|
|
|
|
|
|
|
// create seasons
|
|
|
|
QVariantList seasons = data["seasons"].toList();
|
|
|
|
|
|
|
|
for(QVariant seasonVar : seasons) {
|
|
|
|
QVariantMap seasonMap = seasonVar.toMap();
|
|
|
|
int seasonId = seasonMap["name"].toInt();
|
|
|
|
BRSeason* season = this->getSeason(
|
|
|
|
calendarData->calendar->getFederation(),
|
|
|
|
seasonId,
|
|
|
|
this->parseSeasonData(seasonMap)
|
|
|
|
);
|
|
|
|
|
|
|
|
calendarData->seasons.append(season);
|
|
|
|
qDebug() << "Inserted season:" << season->getName();
|
|
|
|
|
|
|
|
if(seasonId == data["current"].toMap()["season"].toInt())
|
|
|
|
calendarData->currentSeason = season;
|
|
|
|
}
|
|
|
|
|
|
|
|
// load default league of current season
|
|
|
|
calendarData->currentSeason->getLeagues()[0]->load();
|
|
|
|
|
|
|
|
return BRWidget::Success;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BRWidget::BRWidgetStatusCode BRProviderVl::getWidgetData(BRSeason::BRSeasonData* seasonData) {
|
|
|
|
if(seasonData->season->getLeagues().length() > 0) {
|
|
|
|
// leagues are already loaded
|
|
|
|
|
|
|
|
// load default league
|
|
|
|
seasonData->season->getLeagues()[0]->load();
|
|
|
|
|
|
|
|
return BRWidget::Success;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// should never happen
|
|
|
|
return BRWidget::NotImplementedError;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
BRSeason::BRSeasonData BRProviderVl::parseSeasonData(QVariantMap rawData) {
|
|
|
|
BRSeason::BRSeasonData data;
|
|
|
|
data.year = rawData["name"].toInt();
|
|
|
|
data.name = rawData["name"].toString();
|
|
|
|
data.nativeMultiLeagueSupport = false;
|
|
|
|
|
|
|
|
// insert the leagues
|
|
|
|
for(QVariant leagueVar : rawData["leagues"].toList()) {
|
|
|
|
QVariantMap leagueMap = leagueVar.toMap();
|
|
|
|
|
|
|
|
BRLeague::BRLeagueData leagueData;
|
|
|
|
leagueData.name = leagueMap["name"].toString();
|
|
|
|
int leagueId = leagueMap["url"].toString().split("/").last().toInt();
|
|
|
|
|
|
|
|
BRLeague* league = this->getLeague(BRWidget::IFSC, leagueId, leagueData);
|
|
|
|
data.leagues.append(league);
|
|
|
|
}
|
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
|
|
|
BRWidget::BRWidgetStatusCode BRProviderVl::getWidgetData(BRLeague::BRLeagueData* leagueData) {
|
|
|
|
// load some data
|
|
|
|
QString requestUrl = "https://ifsc.results.info/api/v1/season_leagues/" + QString::number(leagueData->league->getId());
|
2022-10-24 10:07:39 +02:00
|
|
|
QVariantMap ret = this->serverRequest(QUrl(requestUrl), {{"x-auth-token", "cc7375f680648e7e6171e035e70351eb"}, {"Referer", "https://ifsc.results.info/"}});
|
2020-11-03 15:56:43 +01:00
|
|
|
|
|
|
|
if(ret["status"] != 200){
|
|
|
|
// request was a failure
|
|
|
|
return BRWidget::BRWidgetStatusCode(ret["status"].toInt());
|
|
|
|
}
|
|
|
|
|
|
|
|
QVariantMap data = QJsonDocument::fromJson(ret["text"].toString().toUtf8()).toVariant().toMap();
|
|
|
|
|
|
|
|
this->parseLeagueData(leagueData, data);
|
|
|
|
|
|
|
|
return BRWidget::Success;
|
|
|
|
}
|
|
|
|
|
|
|
|
void BRProviderVl::parseLeagueData(BRLeague::BRLeagueData* data, QVariantMap rawData) {
|
|
|
|
|
|
|
|
BRWidget::BRFederation federation = BRWidget::BRFederation(rawData["federation"].toInt(0));
|
|
|
|
|
|
|
|
data->name = rawData["league"].toString();
|
|
|
|
data->color = QColor("#ffffff"); // TODO
|
2020-11-05 19:37:13 +01:00
|
|
|
data->enabled = true;
|
2020-11-03 15:56:43 +01:00
|
|
|
|
|
|
|
qDebug() << "Adding league: " << data->name;
|
|
|
|
|
|
|
|
// parse competitions
|
|
|
|
QVariantList competitionsVar = rawData["events"].toList();
|
|
|
|
|
|
|
|
for(QVariant competitionVar : competitionsVar) {
|
|
|
|
QVariantMap competitionMap = competitionVar.toMap();
|
|
|
|
|
2020-11-04 13:55:37 +01:00
|
|
|
qDebug() << "- Adding competition: " << competitionMap["event"].toString();
|
2020-11-08 10:47:44 +01:00
|
|
|
BRCompetition* competition = this->getCompetition(federation, competitionVar.toMap()["event_id"].toInt(), this->parseCompetitionData(competitionMap, rawData["d_cats"].toList(), federation));
|
2020-11-03 15:56:43 +01:00
|
|
|
data->competitions.append(competition);
|
|
|
|
}
|
|
|
|
|
|
|
|
// parse cups
|
|
|
|
QVariantList cupsVar = rawData["cups"].toList();
|
|
|
|
|
|
|
|
for(QVariant cupVar : cupsVar) {
|
|
|
|
QVariantMap cupMap = cupVar.toMap();
|
2020-11-08 10:47:44 +01:00
|
|
|
BRCup* cup = this->getCup(federation, cupMap["cup_id"].toInt(), this->parseCupData(cupMap, rawData["d_cats"].toList()));
|
2020-11-03 15:56:43 +01:00
|
|
|
data->cups.append(cup);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BRWidget::BRWidgetStatusCode BRProviderVl::getWidgetData(BRCompetition::BRCompetitionData* competitionData) {
|
2020-11-04 13:55:37 +01:00
|
|
|
if(competitionData->competition->getCurrentCategory() == nullptr)
|
2020-11-04 17:25:28 +01:00
|
|
|
return BRWidget::OpeationNotSupportedError;
|
|
|
|
|
|
|
|
BRCategory* currentCategory = competitionData->competition->getCurrentCategory();
|
|
|
|
|
|
|
|
if(currentCategory->getCurrentRound() == nullptr)
|
|
|
|
return BRWidget::OpeationNotSupportedError;
|
|
|
|
|
|
|
|
BRRound* currentRound = currentCategory->getCurrentRound();
|
|
|
|
BRRound::BRRoundData roundData = currentRound->getData();
|
|
|
|
|
|
|
|
qDebug() << "LOADING ROUND DATA";
|
|
|
|
// load round data
|
|
|
|
QString competitionId = QString::number(roundData.round->getCategory()->getCompetition()->getId());
|
|
|
|
QString categoryId = QString::number(roundData.round->getCategory()->getId());
|
|
|
|
QString roundId = QString::number(roundData.round->getId());
|
|
|
|
|
|
|
|
QString requestUrl;
|
2020-11-03 15:56:43 +01:00
|
|
|
|
2020-11-04 17:25:28 +01:00
|
|
|
if(roundId == "-1") {
|
|
|
|
requestUrl = "https://ifsc.results.info/api/v1/events/" + competitionId + "/result/" + categoryId;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
requestUrl = "https://ifsc.results.info/api/v1/category_rounds/" + roundId + "/results";
|
|
|
|
}
|
|
|
|
|
2022-10-24 10:07:39 +02:00
|
|
|
QVariantMap ret = this->serverRequest(QUrl(requestUrl), {{"x-auth-token", "cc7375f680648e7e6171e035e70351eb"}, {"Referer", "https://ifsc.results.info/"}});
|
2020-11-04 17:25:28 +01:00
|
|
|
|
|
|
|
if(ret["status"] != 200){
|
|
|
|
// request was a failure
|
|
|
|
return BRWidget::BRWidgetStatusCode(ret["status"].toInt());
|
|
|
|
}
|
|
|
|
|
|
|
|
QVariantMap data = QJsonDocument::fromJson(ret["text"].toString().toUtf8()).toVariant().toMap();
|
|
|
|
|
2020-11-15 14:48:12 +01:00
|
|
|
// TODO: reload all rounds, as they may change!
|
|
|
|
// (load category instead of competition)
|
2020-11-04 17:25:28 +01:00
|
|
|
this->parseRoundData(&roundData, data);
|
|
|
|
this->setRoundData(currentRound, roundData);
|
|
|
|
|
|
|
|
return BRWidget::Success;
|
2020-11-03 15:56:43 +01:00
|
|
|
}
|
|
|
|
|
2020-11-08 10:47:44 +01:00
|
|
|
BRCompetition::BRCompetitionData BRProviderVl::parseCompetitionData(QVariantMap rawData, QVariantList globalCategoriesList, BRWidget::BRFederation federation) {
|
2020-11-03 15:56:43 +01:00
|
|
|
|
|
|
|
BRCompetition::BRCompetitionData data;
|
|
|
|
|
|
|
|
data.name = rawData["event"].toString();
|
|
|
|
|
|
|
|
data.startDate = QDate::fromString(rawData["starts_at"].toString().split(" ")[0], "yyyy-MM-dd");
|
|
|
|
data.endDate = QDate::fromString(rawData["ends_at"].toString().split(" ")[0], "yyyy-MM-dd");
|
|
|
|
|
|
|
|
data.eventWebsiteUrl = "";
|
|
|
|
|
|
|
|
for(int i = 0; i < 2; i++) {
|
|
|
|
QString infosheetName = QStringList({"infosheet_url", "additional_info_url"})[i];
|
|
|
|
if(rawData.contains(infosheetName) && !rawData[infosheetName].isNull()) {
|
2020-11-15 14:48:12 +01:00
|
|
|
data.infosheetUrls.append("https://ifsc.results.info" + rawData[infosheetName].toString());
|
2020-11-03 15:56:43 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QVariantList categoriesList = rawData["d_cats"].toList();
|
|
|
|
for(QVariant categoryVar : categoriesList) {
|
|
|
|
QVariantMap categoryMap = categoryVar.toMap();
|
2020-11-08 10:47:44 +01:00
|
|
|
|
|
|
|
// search category in global categories list
|
|
|
|
for(QVariant globalCategoryVar : globalCategoriesList) {
|
|
|
|
QVariantMap globalCategoryMap = globalCategoryVar.toMap();
|
|
|
|
if(categoryMap["id"].toInt() == globalCategoryMap["id"].toInt()) {
|
|
|
|
categoryMap.insert("discipline", globalCategoryMap["discipline"].toString());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-04 13:55:37 +01:00
|
|
|
BRCategory* category = this->getCategory(federation, categoryMap["id"].toInt(), this->parseCategoryData(categoryMap));
|
2020-11-03 15:56:43 +01:00
|
|
|
data.categories.append(category);
|
|
|
|
}
|
|
|
|
|
2020-11-04 17:25:28 +01:00
|
|
|
data.currentCategory = nullptr;
|
|
|
|
|
2020-11-03 15:56:43 +01:00
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-08 10:47:44 +01:00
|
|
|
BRCup::BRCupData BRProviderVl::parseCupData(QVariantMap rawData, QVariantList globalCategoriesList) {
|
2020-11-03 15:56:43 +01:00
|
|
|
BRCup::BRCupData data;
|
|
|
|
|
|
|
|
data.name = rawData["cup"].toString();
|
|
|
|
|
|
|
|
// parse categories
|
|
|
|
for(QVariant categoryVar : rawData["d_cats"].toList()) {
|
|
|
|
// find category name in cats:
|
|
|
|
|
|
|
|
QVariantMap categoryMap = categoryVar.toMap();
|
|
|
|
|
|
|
|
int categoryId = categoryMap["ranking_url"].toString().split("/").last().toInt();
|
2020-11-08 10:47:44 +01:00
|
|
|
|
|
|
|
// search category in global categories list
|
|
|
|
for(QVariant globalCategoryVar : globalCategoriesList) {
|
|
|
|
QVariantMap globalCategoryMap = globalCategoryVar.toMap();
|
|
|
|
if(categoryId == globalCategoryMap["id"].toInt()) {
|
|
|
|
categoryMap.insert("discipline", globalCategoryMap["discipline"].toString());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-03 15:56:43 +01:00
|
|
|
BRCategory* category = this->getCategory(BRWidget::IFSC, categoryId, this->parseCategoryData(categoryMap));
|
|
|
|
data.categories.append(category);
|
|
|
|
}
|
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
2020-11-04 13:55:37 +01:00
|
|
|
|
|
|
|
|
2020-11-03 15:56:43 +01:00
|
|
|
BRCategory::BRCategoryData BRProviderVl::parseCategoryData(QVariantMap rawData) {
|
|
|
|
BRCategory::BRCategoryData data;
|
2020-11-04 13:55:37 +01:00
|
|
|
|
2020-11-03 15:56:43 +01:00
|
|
|
data.name = rawData["name"].toString();
|
2020-11-08 10:47:44 +01:00
|
|
|
// TODO: gender
|
|
|
|
|
|
|
|
// parse status and discipline
|
|
|
|
QMap<QString, BRCategory::BRCategoryStatus> statusTranslations = {
|
|
|
|
{"registration_pending", BRCategory::Registration},
|
|
|
|
{"registration_active", BRCategory::Registration},
|
|
|
|
// TODO {2, BRCategory::Startlist},
|
|
|
|
{"active", BRCategory::Result},
|
|
|
|
{"finished", BRCategory::Result}
|
|
|
|
};
|
|
|
|
|
|
|
|
QMap<QString, BRCategory::BRDiscipline> disciplineTranslations = {
|
|
|
|
{"Boulder", BRCategory::Boulder},
|
|
|
|
{"Lead", BRCategory::Lead},
|
|
|
|
{"Speed", BRCategory::Speed}
|
|
|
|
};
|
|
|
|
|
|
|
|
if(disciplineTranslations.contains(rawData["discipline"].toString()))
|
|
|
|
data.discipline = disciplineTranslations[rawData["discipline"].toString()];
|
|
|
|
else
|
|
|
|
data.discipline = BRCategory::UnknownDiscipline;
|
|
|
|
|
|
|
|
if(statusTranslations.contains(rawData["status"].toString()))
|
|
|
|
data.status = statusTranslations[rawData["status"].toString()];
|
|
|
|
else
|
|
|
|
data.status = BRCategory::UnknownStatus;
|
|
|
|
|
|
|
|
qDebug() << "-- Parsing category: " << data.name << " with discipline: " << data.discipline << " and status: " << data.status;
|
|
|
|
|
2020-11-04 13:55:37 +01:00
|
|
|
data.currentRound = nullptr;
|
|
|
|
|
2020-11-15 14:48:12 +01:00
|
|
|
BRRound::BRRoundData roundData;
|
|
|
|
roundData.name = "General result";
|
|
|
|
qDebug() << "--- Adding round: " << roundData.name;
|
|
|
|
data.generalResult = this->getRound(BRWidget::IFSC, -1, roundData, true);
|
|
|
|
|
2020-11-04 13:55:37 +01:00
|
|
|
// load rounds
|
|
|
|
QVariantList roundsList = rawData["category_rounds"].toList();
|
|
|
|
// insert general result
|
|
|
|
for(QVariant roundVar : roundsList) {
|
|
|
|
QVariantMap roundMap = roundVar.toMap();
|
|
|
|
|
|
|
|
BRRound::BRRoundData roundData;
|
|
|
|
roundData.name = roundMap["name"].toString();
|
|
|
|
qDebug() << "--- Adding round: " << roundData.name;
|
|
|
|
BRRound* round = this->getRound(BRWidget::IFSC, roundMap["category_round_id"].toInt(), roundData);
|
|
|
|
data.rounds.append(round);
|
|
|
|
}
|
|
|
|
|
2020-11-15 14:48:12 +01:00
|
|
|
data.currentRound = data.generalResult;
|
2020-11-04 13:55:37 +01:00
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
2020-11-15 14:48:12 +01:00
|
|
|
/*void BRProviderVl::parseCategoryData(BRCategory::BRCategoryData* categoryData, QVariantMap rawData) {
|
2020-11-04 13:55:37 +01:00
|
|
|
|
|
|
|
// no need to load rounds, they were already loaded when the whole competition was loaded!
|
|
|
|
|
|
|
|
qDebug() << "INITIALLY PARSING CATEGORY";
|
|
|
|
// load athletes
|
|
|
|
QVariantList atheletList = rawData["ranking"].toList();
|
|
|
|
QMap<int, BRAthlete*> tmpAthletes;
|
|
|
|
|
|
|
|
// load general result
|
|
|
|
BRRound::BRRoundData roundData;
|
|
|
|
|
|
|
|
// TODO status
|
|
|
|
roundData.name = tr("General result");
|
|
|
|
|
|
|
|
// parse Ranking
|
|
|
|
QVariantList resultList = rawData["ranking"].toList();
|
|
|
|
for(QVariant resultVar : resultList) {
|
|
|
|
QVariantMap resultMap = resultVar.toMap();
|
|
|
|
|
|
|
|
int athleteId = resultMap["athlete_id"].toInt();
|
|
|
|
if(!tmpAthletes.contains(athleteId))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
qDebug() << "Adding result: rank: " << resultMap["rank"];
|
|
|
|
BRResult::BRResultData resultData;
|
|
|
|
resultData.rank = resultMap["rank"].toInt();
|
|
|
|
resultData.athlete = tmpAthletes[athleteId];
|
2020-11-15 14:48:12 +01:00
|
|
|
BRResult* result = this->getResult(resultData);
|
2020-11-04 13:55:37 +01:00
|
|
|
roundData.results.append(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
BRRound* generalResultRound = this->getRound(BRWidget::IFSC, -1, roundData);
|
|
|
|
qDebug() << "General result round: " << generalResultRound;
|
|
|
|
categoryData->rounds.insert(0, generalResultRound);
|
|
|
|
categoryData->currentRound = generalResultRound;
|
2020-11-15 14:48:12 +01:00
|
|
|
}*/
|
2020-11-04 13:55:37 +01:00
|
|
|
|
|
|
|
BRRound::BRRoundData BRProviderVl::parseRoundData(QVariantMap rawData) {
|
|
|
|
BRRound::BRRoundData data;
|
|
|
|
this->parseRoundData(&data, rawData);
|
2020-11-03 15:56:43 +01:00
|
|
|
return data;
|
|
|
|
}
|
2020-11-04 13:55:37 +01:00
|
|
|
|
|
|
|
void BRProviderVl::parseRoundData(BRRound::BRRoundData* roundData, QVariantMap rawData) {
|
|
|
|
|
|
|
|
// TODO status
|
|
|
|
|
|
|
|
// clear up
|
2020-11-15 14:48:12 +01:00
|
|
|
qDebug() << "clearing";
|
|
|
|
QList<BRRound*> clearRounds;
|
|
|
|
clearRounds.append(roundData->round);
|
|
|
|
|
|
|
|
if(roundData->round->isGeneralResult()) {
|
|
|
|
// if we are parsing a general result -> clear all rounds
|
|
|
|
clearRounds.append(roundData->round->getCategory()->getRounds());
|
|
|
|
}
|
|
|
|
|
|
|
|
for(BRRound* round : clearRounds) {
|
|
|
|
for(BRResult* result : round->getResults())
|
|
|
|
result->deleteLater();
|
|
|
|
|
|
|
|
BRRound::BRRoundData roundData = round->getData();
|
|
|
|
roundData.results.clear();
|
|
|
|
this->setRoundData(round, roundData);
|
|
|
|
}
|
2020-11-04 13:55:37 +01:00
|
|
|
|
|
|
|
roundData->results.clear();
|
2020-11-15 14:48:12 +01:00
|
|
|
qDebug() << "finished clearing";
|
|
|
|
|
2020-11-04 13:55:37 +01:00
|
|
|
|
2020-11-15 14:48:12 +01:00
|
|
|
// parse Ranking
|
2020-11-04 13:55:37 +01:00
|
|
|
QVariantList resultList = rawData["ranking"].toList();
|
|
|
|
for(QVariant resultVar : resultList) {
|
|
|
|
QVariantMap resultMap = resultVar.toMap();
|
|
|
|
|
|
|
|
// load athlete
|
|
|
|
BRAthlete::BRAthleteData athleteData;
|
|
|
|
// TODO: start number
|
|
|
|
athleteData.firstName = resultMap["firstname"].toString();
|
|
|
|
athleteData.lastName = resultMap["lastname"].toString();
|
|
|
|
athleteData.federation = resultMap["country"].toString();
|
|
|
|
athleteData.nation = resultMap["country"].toString();
|
|
|
|
qDebug() << "--- Adding athlete: " << athleteData.firstName << " " << athleteData.lastName;
|
|
|
|
|
|
|
|
BRAthlete* athlete = this->getAthlete(BRWidget::IFSC, resultMap["athlete_id"].toInt(), athleteData);
|
|
|
|
|
|
|
|
// load result
|
|
|
|
qDebug() << "Adding result: rank: " << resultMap["rank"];
|
|
|
|
BRResult::BRResultData resultData;
|
|
|
|
resultData.rank = resultMap["rank"].toInt();
|
|
|
|
resultData.athlete = athlete;
|
2020-11-15 14:48:12 +01:00
|
|
|
|
|
|
|
// if this is the general result -> parse all other rounds as well
|
|
|
|
if(roundData->round->isGeneralResult()) {
|
|
|
|
qDebug() << "THIS is general result!!";
|
|
|
|
resultData.details = new BRResultDetailsGeneralResult();
|
|
|
|
|
|
|
|
// add results of other rounds
|
|
|
|
for(QVariant subRoundVar : resultMap["rounds"].toList()) {
|
|
|
|
QVariantMap subRoundMap = subRoundVar.toMap();
|
|
|
|
for(BRRound* subRound : roundData->round->getCategory()->getRounds(false)) {
|
|
|
|
if(subRound->getId() == subRoundMap["category_round_id"].toInt()) {
|
|
|
|
BRResult::BRResultData subResultData;
|
|
|
|
subResultData.rank = subRoundMap["rank"].toInt();
|
|
|
|
subResultData.athlete = athlete;
|
|
|
|
subResultData.details = new BRResultDetailsUnknown(subRoundMap["score"].toString());
|
|
|
|
|
|
|
|
|
|
|
|
qDebug() << "Adding subResult: rank: " << resultMap["rank"];
|
|
|
|
|
|
|
|
BRRound::BRRoundData subRoundData = subRound->getData();
|
|
|
|
subRoundData.results.append(this->getResult(subResultData));
|
|
|
|
this->setRoundData(subRound, subRoundData);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
resultData.details = new BRResultDetailsUnknown(resultMap["score"].toString());
|
|
|
|
|
|
|
|
BRResult* result = this->getResult(resultData);
|
2020-11-04 13:55:37 +01:00
|
|
|
roundData->results.append(result);
|
|
|
|
}
|
|
|
|
}
|