1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 13:04:23 +00:00

Improve last patch

This commit is contained in:
Christophe Dumez 2011-04-13 17:32:28 +00:00
parent 3154461f28
commit fd4f46485c

View File

@ -298,18 +298,6 @@ void QBtSession::configureSession() {
#endif
preAllocateAllFiles(pref.preAllocateAllFiles());
startTorrentsInPause(pref.addTorrentsInPause());
// * Scan dirs
const QStringList scan_dirs = pref.getScanDirs();
QList<bool> downloadInDirList = pref.getDownloadInScanDirs();
while(scan_dirs.size() > downloadInDirList.size()) {
downloadInDirList << false;
}
int i = 0;
foreach (const QString &dir, scan_dirs) {
qDebug() << "Adding scan dir" << dir << downloadInDirList.at(i);
m_scanFolders->addPath(dir, downloadInDirList.at(i));
++i;
}
// * Export Dir
const bool newTorrentExport = pref.isTorrentExportEnabled();
if(torrentExport != newTorrentExport) {
@ -586,6 +574,18 @@ void QBtSession::configureSession() {
if(m_tracker)
delete m_tracker;
}
// * Scan dirs
const QStringList scan_dirs = pref.getScanDirs();
QList<bool> downloadInDirList = pref.getDownloadInScanDirs();
while(scan_dirs.size() > downloadInDirList.size()) {
downloadInDirList << false;
}
int i = 0;
foreach (const QString &dir, scan_dirs) {
qDebug() << "Adding scan dir" << dir << downloadInDirList.at(i);
m_scanFolders->addPath(dir, downloadInDirList.at(i));
++i;
}
qDebug("Session configured");
}