Delay subsequent requests to the same host

PR #19801.
Closes #8350.
This commit is contained in:
jNullj
2024-01-19 19:38:16 +02:00
committed by GitHub
parent 8ec3db1807
commit c5d7b62473
13 changed files with 98 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2024 Jonathan Ketchker
* Copyright (C) 2018 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2006-2012 Christophe Dumez <chris@qbittorrent.org>
* Copyright (C) 2006-2012 Ishan Arora <ishan@qbittorrent.org>
@@ -321,6 +322,7 @@ void AppController::preferencesAction()
// RSS settings
data[u"rss_refresh_interval"_s] = RSS::Session::instance()->refreshInterval();
data[u"rss_fetch_delay"_s] = static_cast<qlonglong>(RSS::Session::instance()->fetchDelay().count());
data[u"rss_max_articles_per_feed"_s] = RSS::Session::instance()->maxArticlesPerFeed();
data[u"rss_processing_enabled"_s] = RSS::Session::instance()->isProcessingEnabled();
data[u"rss_auto_downloading_enabled"_s] = RSS::AutoDownloader::instance()->isProcessingEnabled();
@@ -870,6 +872,8 @@ void AppController::setPreferencesAction()
if (hasKey(u"rss_refresh_interval"_s))
RSS::Session::instance()->setRefreshInterval(it.value().toInt());
if (hasKey(u"rss_fetch_delay"_s))
RSS::Session::instance()->setFetchDelay(std::chrono::seconds(it.value().toLongLong()));
if (hasKey(u"rss_max_articles_per_feed"_s))
RSS::Session::instance()->setMaxArticlesPerFeed(it.value().toInt());
if (hasKey(u"rss_processing_enabled"_s))