Improve UI responsiveness during RSS downloading. Closes #873, #1089, #1235, #5423.

--HG--
branch : magao-dev
This commit is contained in:
Tim Delaney
2016-11-07 08:56:06 +11:00
parent 3b3de81cb7
commit 390d7a8124
4 changed files with 51 additions and 2 deletions

View File

@@ -361,6 +361,14 @@ void Feed::handleFeedTitle(const QString &title)
void Feed::downloadArticleTorrentIfMatching(const ArticlePtr &article)
{
Q_ASSERT(Preferences::instance()->isRssDownloadingEnabled());
qDebug().nospace() << Q_FUNC_INFO << " Deferring matching of " << article->title() << " from " << displayName() << " RSS feed";
m_manager->downloadArticleTorrentIfMatching(m_url, article);
}
void Feed::deferredDownloadArticleTorrentIfMatching(const ArticlePtr &article)
{
qDebug().nospace() << Q_FUNC_INFO << " Matching of " << article->title() << " from " << displayName() << " RSS feed";
DownloadRuleList *rules = m_manager->downloadRules();
DownloadRulePtr matchingRule = rules->findMatchingRule(m_url, article->title());
if (!matchingRule) return;