Test if 'data' exists in json file
This commit is contained in:
parent
1e486dbbf6
commit
59247b1c4f
@ -138,6 +138,8 @@ std::vector< string > getEpisodeNames( const string &id, const string &season,
|
|||||||
json.Parse( request.get( baseurl + page ).c_str() );
|
json.Parse( request.get( baseurl + page ).c_str() );
|
||||||
if ( json.HasParseError() )
|
if ( json.HasParseError() )
|
||||||
return {};
|
return {};
|
||||||
|
if( json.FindMember("data") == json.MemberEnd() )
|
||||||
|
break;
|
||||||
|
|
||||||
if ( json["data"].IsArray() ) {
|
if ( json["data"].IsArray() ) {
|
||||||
rapidjson::Value &epdata = json["data"];
|
rapidjson::Value &epdata = json["data"];
|
||||||
|
Loading…
Reference in New Issue
Block a user