From ebb9aa61d496f95a267a770fd9ae6f36cf609f07 Mon Sep 17 00:00:00 2001 From: Sude Date: Thu, 19 Jun 2014 00:31:09 +0300 Subject: [PATCH] Remove language id/code from urls as GOG no longer requires it. --- src/api.cpp | 6 +++--- src/downloader.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api.cpp b/src/api.cpp index 2117cb9..0eea3a5 100644 --- a/src/api.cpp +++ b/src/api.cpp @@ -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); diff --git a/src/downloader.cpp b/src/downloader.cpp index 6ae9328..6d69f9f 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -1633,7 +1633,7 @@ std::vector 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 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 Downloader::getExtras(const std::string& gamename, const s Json::Reader *jsonparser = new Json::Reader; std::vector 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))