Show progress for getting game names from account page

This commit is contained in:
Sude 2016-05-20 12:25:29 +03:00
parent 06fd4d496c
commit b7846e8bd5

View File

@ -150,6 +150,7 @@ std::vector<gameItem> Website::getGames()
{ {
for (unsigned int i = 0; i < root["products"].size(); ++i) for (unsigned int i = 0; i < root["products"].size(); ++i)
{ {
std::cerr << "Getting game names " << "(" << root["page"].asInt() << "/" << root["totalPages"].asInt() << ") " << i+1 << " / " << root["products"].size() << "\r" << std::flush;
Json::Value product = root["products"][i]; Json::Value product = root["products"][i];
gameItem game; gameItem game;
game.name = product["slug"].asString(); game.name = product["slug"].asString();
@ -229,6 +230,7 @@ std::vector<gameItem> Website::getGames()
} }
i++; i++;
} while (!bAllPagesParsed); } while (!bAllPagesParsed);
std::cerr << std::endl;
delete jsonparser; delete jsonparser;