mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 15:32:48 -07:00
Improve RSS Feed updating
Don't process "out-of-limit" articles. Closes #9833.
This commit is contained in:
parent
ceb4a0d5fe
commit
64d7cf4794
4 changed files with 101 additions and 63 deletions
|
@ -582,16 +582,6 @@ void Parser::parse_impl(const QByteArray &feedData)
|
|||
.arg(xml.errorString()).arg(xml.lineNumber())
|
||||
.arg(xml.columnNumber()).arg(xml.characterOffset());
|
||||
}
|
||||
else {
|
||||
// Sort article list chronologically
|
||||
// NOTE: We don't need to sort it here if articles are always
|
||||
// sorted in fetched XML in reverse chronological order
|
||||
std::sort(m_result.articles.begin(), m_result.articles.end()
|
||||
, [](const QVariantHash &a1, const QVariantHash &a2)
|
||||
{
|
||||
return a1["date"].toDateTime() < a2["date"].toDateTime();
|
||||
});
|
||||
}
|
||||
|
||||
emit finished(m_result);
|
||||
m_result.articles.clear(); // clear articles only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue