mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07:00
Change "metadata received" stop condition behavior
PR #20283. Closes #20122.
This commit is contained in:
parent
05572a7317
commit
8ec3db1807
4 changed files with 37 additions and 29 deletions
|
@ -2749,6 +2749,14 @@ bool SessionImpl::addTorrent_impl(const TorrentDescriptor &source, const AddTorr
|
|||
|
||||
if (hasMetadata)
|
||||
{
|
||||
// Torrent that is being added with metadata is considered to be added as stopped
|
||||
// if "metadata received" stop condition is set for it.
|
||||
if (loadTorrentParams.stopCondition == Torrent::StopCondition::MetadataReceived)
|
||||
{
|
||||
loadTorrentParams.stopped = true;
|
||||
loadTorrentParams.stopCondition = Torrent::StopCondition::None;
|
||||
}
|
||||
|
||||
const TorrentInfo &torrentInfo = *source.info();
|
||||
|
||||
Q_ASSERT(addTorrentParams.filePaths.isEmpty() || (addTorrentParams.filePaths.size() == torrentInfo.filesCount()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue