mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Handle torrent "paused" state at application level
This commit is contained in:
parent
b249216db6
commit
85bd0feee0
10 changed files with 157 additions and 146 deletions
|
@ -357,7 +357,7 @@ void TransferListWidget::startSelectedTorrents()
|
|||
void TransferListWidget::forceStartSelectedTorrents()
|
||||
{
|
||||
for (BitTorrent::TorrentHandle *const torrent : asConst(getSelectedTorrents()))
|
||||
torrent->resume(true);
|
||||
torrent->resume(BitTorrent::TorrentOperatingMode::Forced);
|
||||
}
|
||||
|
||||
void TransferListWidget::startVisibleTorrents()
|
||||
|
@ -965,14 +965,24 @@ void TransferListWidget::displayListMenu(const QPoint &)
|
|||
allSameSuperSeeding = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!torrent->isForced())
|
||||
needsForce = true;
|
||||
else
|
||||
needsStart = true;
|
||||
|
||||
if (torrent->isPaused())
|
||||
needsStart = true;
|
||||
else
|
||||
needsPause = true;
|
||||
|
||||
if (torrent->isErrored() || torrent->hasMissingFiles()) {
|
||||
// If torrent is in "errored" or "missing files" state
|
||||
// it cannot keep further processing until you restart it.
|
||||
needsStart = true;
|
||||
needsForce = true;
|
||||
}
|
||||
|
||||
if (torrent->hasMetadata())
|
||||
needsPreview = true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue