mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-02 05:52:31 +01:00
Check if json has serials node and check if it is empty
Fixes downloader creating serials.txt even if the game didn't have any serials
This commit is contained in:
parent
5af5a286e7
commit
3e0c36beb5
@ -2243,7 +2243,14 @@ std::string Downloader::getSerialsFromJSON(const Json::Value& json)
|
|||||||
{
|
{
|
||||||
std::ostringstream serials;
|
std::ostringstream serials;
|
||||||
|
|
||||||
|
if (!json.isMember("cdKey"))
|
||||||
|
return std::string();
|
||||||
|
|
||||||
std::string cdkey = json["cdKey"].asString();
|
std::string cdkey = json["cdKey"].asString();
|
||||||
|
|
||||||
|
if (cdkey.empty())
|
||||||
|
return std::string();
|
||||||
|
|
||||||
if (cdkey.find("<span>") == std::string::npos)
|
if (cdkey.find("<span>") == std::string::npos)
|
||||||
{
|
{
|
||||||
serials << cdkey << std::endl;
|
serials << cdkey << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user