mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
- Remember alternative speeds state on restart
This commit is contained in:
parent
06efd64a80
commit
540da69d61
1 changed files with 11 additions and 2 deletions
|
@ -287,7 +287,12 @@ void Bittorrent::configureSession() {
|
|||
addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));
|
||||
}
|
||||
// * Global download limit
|
||||
int down_limit = Preferences::getGlobalDownloadLimit();
|
||||
bool alternative_speeds = Preferences::isAltBandwidthEnabled();
|
||||
int down_limit;
|
||||
if(alternative_speeds)
|
||||
down_limit = Preferences::getAltGlobalDownloadLimit();
|
||||
else
|
||||
down_limit = Preferences::getGlobalDownloadLimit();
|
||||
if(down_limit <= 0) {
|
||||
// Download limit disabled
|
||||
setDownloadRateLimit(-1);
|
||||
|
@ -295,7 +300,11 @@ void Bittorrent::configureSession() {
|
|||
// Enabled
|
||||
setDownloadRateLimit(down_limit*1024);
|
||||
}
|
||||
int up_limit = Preferences::getGlobalUploadLimit();
|
||||
int up_limit;
|
||||
if(alternative_speeds)
|
||||
up_limit = Preferences::getAltGlobalUploadLimit();
|
||||
else
|
||||
up_limit = Preferences::getGlobalUploadLimit();
|
||||
// * Global Upload limit
|
||||
if(up_limit <= 0) {
|
||||
// Upload limit disabled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue