mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[core] Treat custom map download URL as CDN base, not meta server
- Update `MapFilesDownloader::LoadMetaConfig()` to skip the metaserver when a custom base URL is set and build MetaConfig with that URL as the only server. - Keep the existing metaserver-based behavior when no custom base URL is set. Signed-off-by: NoelClick <dev@noel.click>
This commit is contained in:
@@ -155,16 +155,19 @@ std::string Platform::ReadPathForFile(std::string const & file, std::string sear
|
||||
"\nr: ", m_resourcesDir, "\ns: ", m_settingsDir));
|
||||
}
|
||||
|
||||
void Platform::SetCustomMetaServerUrl(std::string const & url)
|
||||
void Platform::SetCustomMapServerUrl(std::string & url)
|
||||
{
|
||||
g_customMetaServerUrl = url;
|
||||
strings::Trim(url);
|
||||
m_customMapServerUrl = std::move(url);
|
||||
}
|
||||
|
||||
std::string const & Platform::CustomMapServerUrl() const
|
||||
{
|
||||
return m_customMapServerUrl;
|
||||
}
|
||||
|
||||
std::string Platform::MetaServerUrl() const
|
||||
{
|
||||
if (!g_customMetaServerUrl.empty())
|
||||
return g_customMetaServerUrl;
|
||||
|
||||
return METASERVER_URL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user