mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 21:52:32 -06:00
Change "metadata received" stop condition behavior
PR #20283. Closes #20122.
This commit is contained in:
committed by
Vladimir Golovnev (Glassez)
parent
e74b587420
commit
acd9102dc2
@@ -2807,6 +2807,14 @@ bool SessionImpl::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &so
|
||||
|
||||
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 = std::get<TorrentInfo>(source);
|
||||
|
||||
Q_ASSERT(addTorrentParams.filePaths.isEmpty() || (addTorrentParams.filePaths.size() == torrentInfo.filesCount()));
|
||||
|
||||
Reference in New Issue
Block a user