mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-30 20:28:05 -06:00
committed by
GitHub
parent
72ac92ec68
commit
5d4766edbe
@@ -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))
|
||||
|
||||
@@ -661,6 +661,7 @@ void TorrentsController::addAction()
|
||||
const bool skipChecking = parseBool(params()[u"skip_checking"_qs]).value_or(false);
|
||||
const bool seqDownload = parseBool(params()[u"sequentialDownload"_qs]).value_or(false);
|
||||
const bool firstLastPiece = parseBool(params()[u"firstLastPiecePrio"_qs]).value_or(false);
|
||||
const std::optional<bool> addToQueueTop = parseBool(params()[u"addToTopOfQueue"_qs]);
|
||||
const std::optional<bool> addPaused = parseBool(params()[u"paused"_qs]);
|
||||
const QString savepath = params()[u"savepath"_qs].trimmed();
|
||||
const QString downloadPath = params()[u"downloadPath"_qs].trimmed();
|
||||
@@ -706,6 +707,7 @@ void TorrentsController::addAction()
|
||||
addTorrentParams.skipChecking = skipChecking;
|
||||
addTorrentParams.sequential = seqDownload;
|
||||
addTorrentParams.firstLastPiecePriority = firstLastPiece;
|
||||
addTorrentParams.addToQueueTop = addToQueueTop;
|
||||
addTorrentParams.addPaused = addPaused;
|
||||
addTorrentParams.stopCondition = stopCondition;
|
||||
addTorrentParams.contentLayout = contentLayout;
|
||||
|
||||
Reference in New Issue
Block a user