Remove language id/code from urls as GOG no longer requires it.

This commit is contained in:
Sude 2014-06-19 00:31:09 +03:00
parent 23ded13050
commit ebb9aa61d4
2 changed files with 6 additions and 6 deletions

View File

@ -65,9 +65,9 @@ int API::init()
int API::getAPIConfig()
{
std::string url = "https://api.gog.com/en/downloader2/status/stable/"; // Stable API
//std::string url = "https://api.gog.com/en/downloader2/status/beta/"; // Beta API
//std::string url = "https://api.gog.com/en/downloader2/status/e77989ed21758e78331b20e477fc5582/"; // Development API? Not sure because the downloader version number it reports is lower than beta.
std::string url = "https://api.gog.com/downloader2/status/stable/"; // Stable API
//std::string url = "https://api.gog.com/downloader2/status/beta/"; // Beta API
//std::string url = "https://api.gog.com/downloader2/status/e77989ed21758e78331b20e477fc5582/"; // Development API? Not sure because the downloader version number it reports is lower than beta.
int res = 0;
std::string json = this->getResponse(url);

View File

@ -1633,7 +1633,7 @@ std::vector<gameItem> Downloader::getGames()
do
{
std::string response = this->getResponse("https://secure.gog.com/en/account/ajax?a=gamesShelfMore&s=title&q=&t=0&p=" + std::to_string(i));
std::string response = this->getResponse("https://secure.gog.com/account/ajax?a=gamesShelfMore&s=title&q=&t=0&p=" + std::to_string(i));
// Parse JSON
if (!jsonparser->parse(response, root))
@ -1700,7 +1700,7 @@ std::vector<gameItem> Downloader::getGames()
Json::Value root;
Json::Reader *jsonparser = new Json::Reader;
std::string gameDataUrl = "https://secure.gog.com/en/account/ajax?a=gamesListDetails&g=" + game.id;
std::string gameDataUrl = "https://secure.gog.com/account/ajax?a=gamesListDetails&g=" + game.id;
std::string json = this->getResponse(gameDataUrl);
// Parse JSON
if (!jsonparser->parse(json, root))
@ -1847,7 +1847,7 @@ std::vector<gameFile> Downloader::getExtras(const std::string& gamename, const s
Json::Reader *jsonparser = new Json::Reader;
std::vector<gameFile> extras;
std::string gameDataUrl = "https://secure.gog.com/en/account/ajax?a=gamesListDetails&g=" + gameid;
std::string gameDataUrl = "https://secure.gog.com/account/ajax?a=gamesListDetails&g=" + gameid;
std::string json = this->getResponse(gameDataUrl);
// Parse JSON
if (!jsonparser->parse(json, root))