mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 01:44:26 +00:00
- Unqueue torrents before disabling queueing system
This commit is contained in:
parent
7a925f15ba
commit
360c8500bb
@ -346,6 +346,27 @@ void bittorrent::setQueueingEnabled(bool enable) {
|
|||||||
queuedUploads = new QStringList();
|
queuedUploads = new QStringList();
|
||||||
updateUploadQueue();
|
updateUploadQueue();
|
||||||
} else {
|
} else {
|
||||||
|
// Unqueue torrents
|
||||||
|
foreach(QString hash, *queuedDownloads) {
|
||||||
|
QTorrentHandle h = getTorrentHandle(hash);
|
||||||
|
h.resume();
|
||||||
|
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued")) {
|
||||||
|
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued");
|
||||||
|
}
|
||||||
|
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".prio")) {
|
||||||
|
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".prio");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach(QString hash, *queuedUploads) {
|
||||||
|
QTorrentHandle h = getTorrentHandle(hash);
|
||||||
|
h.resume();
|
||||||
|
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued")) {
|
||||||
|
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued");
|
||||||
|
}
|
||||||
|
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".prio")) {
|
||||||
|
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".prio");
|
||||||
|
}
|
||||||
|
}
|
||||||
delete downloadQueue;
|
delete downloadQueue;
|
||||||
downloadQueue = 0;
|
downloadQueue = 0;
|
||||||
delete queuedDownloads;
|
delete queuedDownloads;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user