Check for already posted guids in ProfileData::guids.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
cfe57f1931
commit
aa5e7008b2
|
@ -161,7 +161,9 @@ void Document::parse_rss(const pt::ptree &tree)
|
|||
{
|
||||
guid = rssitem.get<string>("link");
|
||||
}
|
||||
if (guid == _profiledata.last_guid)
|
||||
if (any_of(_profiledata.guids.begin(), _profiledata.guids.end(),
|
||||
[&](const auto &old_guid)
|
||||
{ return guid == old_guid; }))
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(debug)
|
||||
<< "Found already posted GUID, stopped parsing.";
|
||||
|
@ -195,7 +197,7 @@ void Document::parse_rss(const pt::ptree &tree)
|
|||
|
||||
BOOST_LOG_TRIVIAL(debug) << "Found GUID: " << item.guid;
|
||||
|
||||
if (_profiledata.last_guid.empty())
|
||||
if (_profiledata.guids.empty())
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(debug) << "This is the first run.";
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user