Browse Source

- Fixed queueing priorities loading on startup

adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
8e074a571a
  1. 4
      src/GUI.cpp
  2. 6
      src/bittorrent.cpp

4
src/GUI.cpp

@ -162,10 +162,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis @@ -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

6
src/bittorrent.cpp

@ -264,18 +264,18 @@ int bittorrent::loadTorrentPriority(QString hash) { @@ -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…
Cancel
Save