mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Change "metadata received" stop condition behavior
PR #20283. Closes #20122.
This commit is contained in:
committed by
GitHub
parent
05572a7317
commit
8ec3db1807
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user