Allow to add new torrents to queue top

PR #18518.
Closes #11599.
This commit is contained in:
Vladimir Golovnev 2023-02-10 17:15:41 +03:00 committed by GitHub
parent 72ac92ec68
commit 5d4766edbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 81 additions and 1 deletions

View file

@ -110,6 +110,7 @@ void AppController::preferencesAction()
// Downloads
// When adding a torrent
data[u"torrent_content_layout"_qs] = Utils::String::fromEnum(session->torrentContentLayout());
data[u"add_to_top_of_queue"_qs] = session->isAddTorrentToQueueTop();
data[u"start_paused_enabled"_qs] = session->isAddTorrentPaused();
data[u"torrent_stop_condition"_qs] = Utils::String::fromEnum(session->torrentStopCondition());
data[u"auto_delete_mode"_qs] = static_cast<int>(TorrentFileGuard::autoDeleteMode());
@ -414,6 +415,8 @@ void AppController::setPreferencesAction()
// When adding a torrent
if (hasKey(u"torrent_content_layout"_qs))
session->setTorrentContentLayout(Utils::String::toEnum(it.value().toString(), BitTorrent::TorrentContentLayout::Original));
if (hasKey(u"add_to_top_of_queue"_qs))
session->setAddTorrentToQueueTop(it.value().toBool());
if (hasKey(u"start_paused_enabled"_qs))
session->setAddTorrentPaused(it.value().toBool());
if (hasKey(u"torrent_stop_condition"_qs))