mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
Improve RSS Feed updating
Don't process "out-of-limit" articles. Closes #9833.
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
|
||||
#include "rss_article.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <QJsonObject>
|
||||
#include <QVariant>
|
||||
|
||||
@@ -73,23 +72,6 @@ Article::Article(Feed *feed, const QVariantHash &varHash)
|
||||
, m_isRead(varHash.value(KeyIsRead, false).toBool())
|
||||
, m_data(varHash)
|
||||
{
|
||||
if (!m_date.isValid())
|
||||
throw std::runtime_error("Bad RSS Article data");
|
||||
|
||||
// If item does not have a guid, fall back to some other identifier
|
||||
if (m_guid.isEmpty())
|
||||
m_guid = varHash.value(KeyTorrentURL).toString();
|
||||
if (m_guid.isEmpty())
|
||||
m_guid = varHash.value(KeyTitle).toString();
|
||||
if (m_guid.isEmpty())
|
||||
throw std::runtime_error("Bad RSS Article data");
|
||||
|
||||
m_data[KeyId] = m_guid;
|
||||
|
||||
if (m_torrentURL.isEmpty()) {
|
||||
m_torrentURL = m_link;
|
||||
m_data[KeyTorrentURL] = m_torrentURL;
|
||||
}
|
||||
}
|
||||
|
||||
Article::Article(Feed *feed, const QJsonObject &jsonObj)
|
||||
|
||||
Reference in New Issue
Block a user