mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
- Use global maximum transfer rates as maximum values in per-torrent speed limiting dialogs (Web UI)
This commit is contained in:
parent
8271e20fac
commit
ee9ca1ece7
2 changed files with 49 additions and 3 deletions
|
@ -46,7 +46,7 @@
|
|||
#include <QTemporaryFile>
|
||||
|
||||
HttpConnection::HttpConnection(QTcpSocket *socket, Bittorrent *BTSession, HttpServer *parent)
|
||||
: QObject(parent), socket(socket), parent(parent), BTSession(BTSession)
|
||||
: QObject(parent), socket(socket), parent(parent), BTSession(BTSession)
|
||||
{
|
||||
socket->setParent(this);
|
||||
connect(socket, SIGNAL(readyRead()), this, SLOT(read()));
|
||||
|
@ -346,6 +346,18 @@ void HttpConnection::respondCommand(QString command)
|
|||
h.file_priority(file_id, priority);
|
||||
}
|
||||
}
|
||||
if(command == "getGlobalUpLimit") {
|
||||
generator.setStatusLine(200, "OK");
|
||||
generator.setContentTypeByExt("html");
|
||||
generator.setMessage(QString::number(BTSession->getSession()->upload_rate_limit()));
|
||||
write();
|
||||
}
|
||||
if(command == "getGlobalDlLimit") {
|
||||
generator.setStatusLine(200, "OK");
|
||||
generator.setContentTypeByExt("html");
|
||||
generator.setMessage(QString::number(BTSession->getSession()->download_rate_limit()));
|
||||
write();
|
||||
}
|
||||
if(command == "getTorrentUpLimit") {
|
||||
QString hash = parser.post("hash");
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue