mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-08 16:33:22 +01:00
Remove language id/code from urls as GOG no longer requires it.
This commit is contained in:
parent
23ded13050
commit
ebb9aa61d4
@ -65,9 +65,9 @@ int API::init()
|
|||||||
|
|
||||||
int API::getAPIConfig()
|
int API::getAPIConfig()
|
||||||
{
|
{
|
||||||
std::string url = "https://api.gog.com/en/downloader2/status/stable/"; // Stable API
|
std::string url = "https://api.gog.com/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/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/e77989ed21758e78331b20e477fc5582/"; // Development API? Not sure because the downloader version number it reports is lower than beta.
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
std::string json = this->getResponse(url);
|
std::string json = this->getResponse(url);
|
||||||
|
@ -1633,7 +1633,7 @@ std::vector<gameItem> Downloader::getGames()
|
|||||||
|
|
||||||
do
|
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
|
// Parse JSON
|
||||||
if (!jsonparser->parse(response, root))
|
if (!jsonparser->parse(response, root))
|
||||||
@ -1700,7 +1700,7 @@ std::vector<gameItem> Downloader::getGames()
|
|||||||
Json::Value root;
|
Json::Value root;
|
||||||
Json::Reader *jsonparser = new Json::Reader;
|
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);
|
std::string json = this->getResponse(gameDataUrl);
|
||||||
// Parse JSON
|
// Parse JSON
|
||||||
if (!jsonparser->parse(json, root))
|
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;
|
Json::Reader *jsonparser = new Json::Reader;
|
||||||
std::vector<gameFile> extras;
|
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);
|
std::string json = this->getResponse(gameDataUrl);
|
||||||
// Parse JSON
|
// Parse JSON
|
||||||
if (!jsonparser->parse(json, root))
|
if (!jsonparser->parse(json, root))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user