mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 14:10:06 +00:00
Provide year/month hint to WMO header parser based on filename
This commit is contained in:
parent
46972e8769
commit
a6ba312f6b
4 changed files with 31 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue