Provide year/month hint to WMO header parser based on filename

This commit is contained in:
Dan Paulat 2025-02-18 23:33:58 -06:00
parent 46972e8769
commit a6ba312f6b
4 changed files with 31 additions and 5 deletions

View file

@ -163,10 +163,11 @@ IemApiProvider::LoadTextProducts(const std::vector<std::string>& textProducts)
if (response.status_code == cpr::status::HTTP_OK)
{
// Load file
auto productId = asyncResponse.first;
std::shared_ptr<awips::TextProductFile> textProductFile {
std::make_shared<awips::TextProductFile>()};
std::istringstream responseBody {response.text};
if (textProductFile->LoadData(responseBody))
if (textProductFile->LoadData(productId, responseBody))
{
textProductFiles.push_back(textProductFile);
}

View file

@ -176,7 +176,7 @@ WarningsProvider::LoadUpdatedFiles(
std::shared_ptr<awips::TextProductFile> textProductFile {
std::make_shared<awips::TextProductFile>()};
std::istringstream responseBody {response.text};
if (textProductFile->LoadData(responseBody))
if (textProductFile->LoadData(filename, responseBody))
{
updatedFiles.push_back(textProductFile);
}