mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
- Fixed queueing priorities loading on startup
This commit is contained in:
parent
e2c7c973fd
commit
8e074a571a
@ -162,10 +162,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
refresher = new QTimer(this);
|
||||
connect(refresher, SIGNAL(timeout()), this, SLOT(updateLists()));
|
||||
refresher->start(1500);
|
||||
// Configure BT session according to options
|
||||
configureSession(true);
|
||||
// Resume unfinished torrents
|
||||
BTSession->resumeUnfinishedTorrents();
|
||||
// Configure BT session according to options
|
||||
configureSession(true);
|
||||
// Add torrent given on command line
|
||||
processParams(torrentCmdLine);
|
||||
// Initialize Web UI
|
||||
|
@ -264,18 +264,18 @@ int bittorrent::loadTorrentPriority(QString hash) {
|
||||
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".prio")) {
|
||||
// Read .queued file
|
||||
QFile prio_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".prio");
|
||||
if(!prio_file.exists()) {
|
||||
return -1;
|
||||
}
|
||||
prio_file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
bool ok = false;
|
||||
int prio = prio_file.readAll().toInt(&ok);
|
||||
prio_file.close();
|
||||
if(!ok) {
|
||||
qDebug("Could not convert prio to integer !!!!!!!");
|
||||
return -1;
|
||||
}
|
||||
qDebug("Prio is %d", prio);
|
||||
return prio;
|
||||
}
|
||||
qDebug(".prio file does not exist !!!!!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user