[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:
NoelClick
2025-11-20 17:38:07 -08:00
committed by jeanbaptisteC
parent 08e8ebd434
commit 6ded75de9c
4 changed files with 36 additions and 10 deletions

View File

@@ -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;
}