|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
#define MICHLIB_NOSOURCE |
|
|
|
|
#include "copcat.h" |
|
|
|
|
#include "GPL.h" |
|
|
|
|
#include "conscolors.h" |
|
|
|
|
#include "mirrorfuncs.h" |
|
|
|
|
|
|
|
|
|
const MString CopernicusCatalog::caturl = "https://stac.marine.copernicus.eu/metadata/catalog.stac.json"; |
|
|
|
@ -205,7 +206,7 @@ RetVal<Json::Value> CopernicusCatalog::GetJSON(const MString& url) const
|
|
|
|
|
content = std::move(val); |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
michlib::message(url + " not found in cache, downloading"); |
|
|
|
|
michlib::message(F(C::BBLACK), url, " not found in cache, downloading", C()); |
|
|
|
|
auto [out, res] = GetUrl(chandle, url); |
|
|
|
|
if(res != CURLE_OK) return Error(pref, MString("can't download JSON: ") + chandle.Err()); |
|
|
|
|
cache->Put(url, out, 3600); |
|
|
|
|