mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 06:02:29 -06:00
Fix explicit Torrent Management Mode in Add New Torrent dialog. Closes #5602.
This commit is contained in:
@@ -51,5 +51,6 @@ namespace BitTorrent
|
||||
bool ignoreShareLimits = false;
|
||||
bool skipChecking = false;
|
||||
TriStateBool createSubfolder;
|
||||
TriStateBool useAutoTMM;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1855,9 +1855,7 @@ bool Session::addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams
|
||||
bool Session::addTorrent_impl(AddTorrentData addData, const MagnetUri &magnetUri,
|
||||
TorrentInfo torrentInfo, const QByteArray &fastresumeData)
|
||||
{
|
||||
addData.savePath = normalizeSavePath(
|
||||
addData.savePath,
|
||||
((!addData.resumed && isAutoTMMDisabledByDefault()) ? defaultSavePath() : ""));
|
||||
addData.savePath = normalizeSavePath(addData.savePath, "");
|
||||
|
||||
if (!addData.category.isEmpty()) {
|
||||
if (!m_categories.contains(addData.category) && !addCategory(addData.category)) {
|
||||
|
||||
@@ -120,6 +120,13 @@ AddTorrentData::AddTorrentData(const AddTorrentParams ¶ms)
|
||||
, ratioLimit(params.ignoreShareLimits ? TorrentHandle::NO_RATIO_LIMIT : TorrentHandle::USE_GLOBAL_RATIO)
|
||||
, seedingTimeLimit(params.ignoreShareLimits ? TorrentHandle::NO_SEEDING_TIME_LIMIT : TorrentHandle::USE_GLOBAL_SEEDING_TIME)
|
||||
{
|
||||
bool useAutoTMM = (params.useAutoTMM == TriStateBool::Undefined
|
||||
? !Session::instance()->isAutoTMMDisabledByDefault()
|
||||
: params.useAutoTMM == TriStateBool::True);
|
||||
if (useAutoTMM)
|
||||
savePath = "";
|
||||
else if (savePath.trimmed().isEmpty())
|
||||
savePath = Session::instance()->defaultSavePath();
|
||||
}
|
||||
|
||||
// TorrentState
|
||||
|
||||
Reference in New Issue
Block a user