Browse Source

Improve last patch

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
fd4f46485c
  1. 24
      src/qtlibtorrent/qbtsession.cpp

24
src/qtlibtorrent/qbtsession.cpp

@ -298,18 +298,6 @@ void QBtSession::configureSession() {
#endif #endif
preAllocateAllFiles(pref.preAllocateAllFiles()); preAllocateAllFiles(pref.preAllocateAllFiles());
startTorrentsInPause(pref.addTorrentsInPause()); 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 // * Export Dir
const bool newTorrentExport = pref.isTorrentExportEnabled(); const bool newTorrentExport = pref.isTorrentExportEnabled();
if(torrentExport != newTorrentExport) { if(torrentExport != newTorrentExport) {
@ -586,6 +574,18 @@ void QBtSession::configureSession() {
if(m_tracker) if(m_tracker)
delete 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"); qDebug("Session configured");
} }

Loading…
Cancel
Save