1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-06 10:15:19 +01:00

Add protocol_version and supported package types to ContentDB urls

This commit is contained in:
rubenwardy
2018-07-29 00:26:03 +01:00
committed by GitHub
parent 2b83af783b
commit 14011bdc7a
4 changed files with 12 additions and 6 deletions

View File

@@ -25,6 +25,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "content/mods.h"
#include "content/subgames.h"
std::string Package::getDownloadURL(const std::string &baseURL) const
{
return baseURL + "/packages/" + author + "/" + name + "/releases/" +
std::to_string(release) + "/download/";
}
#if USE_CURL
std::vector<Package> getPackagesFromURL(const std::string &url)
{
@@ -60,5 +66,4 @@ std::vector<Package> getPackagesFromURL(const std::string &url)
return packages;
}
#endif