mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add protocol_version and supported package types to ContentDB urls
This commit is contained in:
parent
2b83af783b
commit
14011bdc7a
4 changed files with 12 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue