Allow to set torrent stop condition

PR #17814.

Closes #17792.
Closes #929.

(Actually it should close all issues about lack of ability to stop torrent after metadata downloaded or after files are initially checked.)

Also makes explicit the temporary start of the torrent in the case when recheck of the stopped torrent is performed.
This commit is contained in:
Vladimir Golovnev
2022-10-09 16:07:16 +03:00
committed by GitHub
parent ce7d8dee28
commit 67357e9964
19 changed files with 295 additions and 87 deletions

View File

@@ -227,6 +227,9 @@ namespace BitTorrent
void clearPeers() override;
bool setMetadata(const TorrentInfo &torrentInfo) override;
StopCondition stopCondition() const override;
void setStopCondition(StopCondition stopCondition) override;
QString createMagnetURI() const override;
nonstd::expected<QByteArray, QString> exportToBuffer() const override;
nonstd::expected<void, QString> exportToFile(const Path &path) const override;
@@ -332,6 +335,7 @@ namespace BitTorrent
bool m_hasFirstLastPiecePriority = false;
bool m_useAutoTMM;
bool m_isStopped;
StopCondition m_stopCondition;
bool m_unchecked = false;