mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Add protocol_version and supported package types to ContentDB urls
This commit is contained in:
@@ -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
|
||||
|
@@ -39,10 +39,7 @@ struct Package
|
||||
type.empty() || release <= 0);
|
||||
}
|
||||
|
||||
std::string getDownloadURL(const std::string &baseURL) const
|
||||
{
|
||||
return baseURL + "/packages/" + author + "/" + name + "/download/";
|
||||
}
|
||||
std::string getDownloadURL(const std::string &baseURL) const;
|
||||
};
|
||||
|
||||
#if USE_CURL
|
||||
|
Reference in New Issue
Block a user