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:
parent
3154461f28
commit
fd4f46485c
@ -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…
x
Reference in New Issue
Block a user