mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
Prevent torrent from being started unexpectedly
Improves "Metadata received" stop condition handling by "Add new torrent" dialog. The problem is when "Metadata received" stop condition is set the metadata can still be received 0.1 sec before clicking the "OK" button so torrent is actually added with metadata and therefore it cannot respect "Metadata received" stop condition. The solution is to uncheck "Start torrent" checkbox once metadata is received. PR #19597. Closes #19583.
This commit is contained in:
parent
c394868f87
commit
633167a6da
1 changed files with 5 additions and 2 deletions
|
@ -733,6 +733,9 @@ void AddNewTorrentDialog::updateMetadata(const BitTorrent::TorrentInfo &metadata
|
|||
|
||||
m_torrentDescr.setTorrentInfo(metadata);
|
||||
setMetadataProgressIndicator(true, tr("Parsing metadata..."));
|
||||
const auto stopCondition = m_ui->stopConditionComboBox->currentData().value<BitTorrent::Torrent::StopCondition>();
|
||||
if (stopCondition == BitTorrent::Torrent::StopCondition::MetadataReceived)
|
||||
m_ui->startTorrentCheckBox->setChecked(false);
|
||||
|
||||
// Update UI
|
||||
setupTreeview();
|
||||
|
|
Loading…
Reference in a new issue