Pause magnet download when "Start when added" is unchecked (#2902)

Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
Antoine Cœur 2022-04-18 14:03:44 +08:00 committed by GitHub
parent 18da7eb125
commit 9c0038ac8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -296,7 +296,10 @@ static void onHaveAllMetainfo(tr_torrent* tor, tr_incomplete_metadata* m)
tor->incompleteMetadata = nullptr;
tor->isStopping = true;
tor->magnetVerify = true;
tor->startAfterVerify = !tr_sessionGetPaused(tor->session);
if (tr_sessionGetPaused(tor->session))
{
tor->startAfterVerify = false;
}
tor->markEdited();
}
else /* drat. */

View File

@ -1455,6 +1455,7 @@ void tr_torrentStart(tr_torrent* tor)
{
if (tr_isTorrent(tor))
{
tor->startAfterVerify = true;
torrentStart(tor, {});
}
}