mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 04:38:04 -06:00
Handle torrent "paused" state at application level
This commit is contained in:
@@ -119,7 +119,7 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
|
||||
{KEY_TORRENT_AMOUNT_UPLOADED, torrent.totalUpload()},
|
||||
{KEY_TORRENT_AMOUNT_DOWNLOADED_SESSION, torrent.totalPayloadDownload()},
|
||||
{KEY_TORRENT_AMOUNT_UPLOADED_SESSION, torrent.totalPayloadUpload()},
|
||||
{KEY_TORRENT_AMOUNT_LEFT, torrent.incompletedSize()},
|
||||
{KEY_TORRENT_AMOUNT_LEFT, torrent.remainingSize()},
|
||||
{KEY_TORRENT_AMOUNT_COMPLETED, torrent.completedSize()},
|
||||
{KEY_TORRENT_MAX_RATIO, torrent.maxRatio()},
|
||||
{KEY_TORRENT_MAX_SEEDING_TIME, torrent.maxSeedingTime()},
|
||||
|
||||
@@ -888,7 +888,10 @@ void TorrentsController::setForceStartAction()
|
||||
|
||||
const bool value {parseBool(params()["value"], false)};
|
||||
const QStringList hashes {params()["hashes"].split('|')};
|
||||
applyToTorrents(hashes, [value](BitTorrent::TorrentHandle *const torrent) { torrent->resume(value); });
|
||||
applyToTorrents(hashes, [value](BitTorrent::TorrentHandle *const torrent)
|
||||
{
|
||||
torrent->resume(value ? BitTorrent::TorrentOperatingMode::Forced : BitTorrent::TorrentOperatingMode::AutoManaged);
|
||||
});
|
||||
}
|
||||
|
||||
void TorrentsController::deleteAction()
|
||||
|
||||
Reference in New Issue
Block a user