mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
committed by
Chocobo1
parent
1f42ab8c4f
commit
9f36b54b04
@@ -623,6 +623,21 @@ void TorrentsController::setDownloadLimitAction()
|
||||
applyToTorrents(hashes, [limit](BitTorrent::TorrentHandle *torrent) { torrent->setDownloadLimit(limit); });
|
||||
}
|
||||
|
||||
void TorrentsController::setShareLimitsAction()
|
||||
{
|
||||
checkParams({"hashes", "ratioLimit", "seedingTimeLimit"});
|
||||
|
||||
const qreal ratioLimit = params()["ratioLimit"].toDouble();
|
||||
const qlonglong seedingTimeLimit = params()["seedingTimeLimit"].toLongLong();
|
||||
const QStringList hashes = params()["hashes"].split('|');
|
||||
|
||||
applyToTorrents(hashes, [ratioLimit, seedingTimeLimit](BitTorrent::TorrentHandle *torrent)
|
||||
{
|
||||
torrent->setRatioLimit(ratioLimit);
|
||||
torrent->setSeedingTimeLimit(seedingTimeLimit);
|
||||
});
|
||||
}
|
||||
|
||||
void TorrentsController::toggleSequentialDownloadAction()
|
||||
{
|
||||
checkParams({"hashes"});
|
||||
|
||||
Reference in New Issue
Block a user