Merge pull request #12206 from thalieht/monitoredTMM

Disable Auto TMM when not using default savepath from monitored folder
This commit is contained in:
Mike Tzou 2020-03-21 12:23:40 +08:00 committed by GitHub
commit f44f1ffc97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -349,10 +349,14 @@ void ScanFoldersModel::addTorrentsToSession(const QStringList &pathList)
qDebug("File %s added", qUtf8Printable(file));
BitTorrent::AddTorrentParams params;
if (downloadInWatchFolder(file))
if (downloadInWatchFolder(file)) {
params.savePath = QFileInfo(file).dir().path();
else if (!downloadInDefaultFolder(file))
params.useAutoTMM = TriStateBool::False;
}
else if (!downloadInDefaultFolder(file)) {
params.savePath = downloadPathTorrentFolder(file);
params.useAutoTMM = TriStateBool::False;
}
if (file.endsWith(".magnet", Qt::CaseInsensitive)) {
QFile f(file);