Browse Source

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.
adaptive-webui-19844
Vladimir Golovnev 1 year ago committed by GitHub
parent
commit
633167a6da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/gui/addnewtorrentdialog.cpp

3
src/gui/addnewtorrentdialog.cpp

@ -733,6 +733,9 @@ void AddNewTorrentDialog::updateMetadata(const BitTorrent::TorrentInfo &metadata
m_torrentDescr.setTorrentInfo(metadata); m_torrentDescr.setTorrentInfo(metadata);
setMetadataProgressIndicator(true, tr("Parsing 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 // Update UI
setupTreeview(); setupTreeview();

Loading…
Cancel
Save