mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-02 05:52:31 +01:00
Remove tarball specific code from API
This commit is contained in:
parent
06d211f534
commit
2473b6f24d
74
src/api.cpp
74
src/api.cpp
@ -435,33 +435,16 @@ gameDetails API::getGameDetails(const std::string& game_name, const unsigned int
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Treat tarball archives as installers
|
game.patches.push_back(
|
||||||
if (patch["link"].asString().find("/linux/") != std::string::npos && patch["name"].asString() == "Tarball archive")
|
gameFile( patch["notificated"].isInt() ? patch["notificated"].asInt() : std::stoi(patch["notificated"].asString()),
|
||||||
{
|
patch["id"].isInt() ? std::to_string(patch["id"].asInt()) : patch["id"].asString(),
|
||||||
game.installers.push_back(
|
patch["name"].asString(),
|
||||||
gameFile( patch["notificated"].isInt() ? patch["notificated"].asInt() : std::stoi(patch["notificated"].asString()),
|
patch["link"].asString(),
|
||||||
patch["id"].isInt() ? std::to_string(patch["id"].asInt()) : patch["id"].asString(),
|
patch["size"].asString(),
|
||||||
patch["name"].asString(),
|
GlobalConstants::LANGUAGES[i].languageId,
|
||||||
patch["link"].asString(),
|
patches[j].platform
|
||||||
patch["size"].asString(),
|
)
|
||||||
GlobalConstants::LANGUAGES[i].languageId,
|
);
|
||||||
patches[j].platform
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
game.patches.push_back(
|
|
||||||
gameFile( patch["notificated"].isInt() ? patch["notificated"].asInt() : std::stoi(patch["notificated"].asString()),
|
|
||||||
patch["id"].isInt() ? std::to_string(patch["id"].asInt()) : patch["id"].asString(),
|
|
||||||
patch["name"].asString(),
|
|
||||||
patch["link"].asString(),
|
|
||||||
patch["size"].asString(),
|
|
||||||
GlobalConstants::LANGUAGES[i].languageId,
|
|
||||||
patches[j].platform
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Patch is a single file
|
else // Patch is a single file
|
||||||
@ -483,33 +466,16 @@ gameDetails API::getGameDetails(const std::string& game_name, const unsigned int
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Treat tarball archives as installers
|
game.patches.push_back(
|
||||||
if (patchnode["link"].asString().find("/linux/") != std::string::npos && patchnode["name"].asString() == "Tarball archive")
|
gameFile( patchnode["notificated"].isInt() ? patchnode["notificated"].asInt() : std::stoi(patchnode["notificated"].asString()),
|
||||||
{
|
patchnode["id"].isInt() ? std::to_string(patchnode["id"].asInt()) : patchnode["id"].asString(),
|
||||||
game.installers.push_back(
|
patchnode["name"].asString(),
|
||||||
gameFile( patchnode["notificated"].isInt() ? patchnode["notificated"].asInt() : std::stoi(patchnode["notificated"].asString()),
|
patchnode["link"].asString(),
|
||||||
patchnode["id"].isInt() ? std::to_string(patchnode["id"].asInt()) : patchnode["id"].asString(),
|
patchnode["size"].asString(),
|
||||||
patchnode["name"].asString(),
|
GlobalConstants::LANGUAGES[i].languageId,
|
||||||
patchnode["link"].asString(),
|
patches[j].platform
|
||||||
patchnode["size"].asString(),
|
)
|
||||||
GlobalConstants::LANGUAGES[i].languageId,
|
);
|
||||||
patches[j].platform
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
game.patches.push_back(
|
|
||||||
gameFile( patchnode["notificated"].isInt() ? patchnode["notificated"].asInt() : std::stoi(patchnode["notificated"].asString()),
|
|
||||||
patchnode["id"].isInt() ? std::to_string(patchnode["id"].asInt()) : patchnode["id"].asString(),
|
|
||||||
patchnode["name"].asString(),
|
|
||||||
patchnode["link"].asString(),
|
|
||||||
patchnode["size"].asString(),
|
|
||||||
GlobalConstants::LANGUAGES[i].languageId,
|
|
||||||
patches[j].platform
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user