From 8e074a571a3d89b09d6dfbabababe07de5bcb565 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 28 Sep 2008 17:58:12 +0000 Subject: [PATCH] - Fixed queueing priorities loading on startup --- src/GUI.cpp | 4 ++-- src/bittorrent.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index 05d9b823d..e9c93e8e5 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -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 diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 88e1d80be..d9589b4ca 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -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; }