Always use array value when listing game details in JSON format

This commit is contained in:
Sude 2023-03-14 09:57:10 +02:00
parent c9198d672d
commit 9e49b6fa20

View File

@ -554,8 +554,11 @@ int Downloader::listGames()
if (Globals::globalConfig.iListFormat == GlobalConstants::LIST_FORMAT_DETAILS_JSON)
{
Json::Value json(Json::arrayValue);
for (auto game : this->games)
std::cout << game.getDetailsAsJson() << std::endl;
json.append(game.getDetailsAsJson());
std::cout << json << std::endl;
}
else if (Globals::globalConfig.iListFormat == GlobalConstants::LIST_FORMAT_DETAILS_TEXT)
{