Browse Source

Fix folder scanning: it would not detect torrents already present in the folder on startup. This bug was introduced recently (in rc1)

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
d9fa9c3566
  1. 2
      src/bittorrent.cpp
  2. 6
      src/filesystemwatcher.h

2
src/bittorrent.cpp

@ -140,9 +140,9 @@ Bittorrent::Bittorrent()
#ifdef LIBTORRENT_0_15 #ifdef LIBTORRENT_0_15
appendqBExtension = Preferences::useIncompleteFilesExtension(); appendqBExtension = Preferences::useIncompleteFilesExtension();
#endif #endif
connect(m_scanFolders, SIGNAL(torrentsAdded(QStringList&)), this, SLOT(addTorrentsFromScanFolder(QStringList&)));
// Apply user settings to Bittorrent session // Apply user settings to Bittorrent session
configureSession(); configureSession();
connect(m_scanFolders, SIGNAL(torrentsAdded(QStringList&)), this, SLOT(addTorrentsFromScanFolder(QStringList&)));
qDebug("* BTSession constructed"); qDebug("* BTSession constructed");
} }

6
src/filesystemwatcher.h

@ -103,12 +103,6 @@ public:
connect(this, SIGNAL(directoryChanged(QString)), this, SLOT(scanLocalFolder(QString))); connect(this, SIGNAL(directoryChanged(QString)), this, SLOT(scanLocalFolder(QString)));
} }
FileSystemWatcher(QString path, QObject *parent): QFileSystemWatcher(parent) {
filters << "*.torrent";
connect(this, SIGNAL(directoryChanged(QString)), this, SLOT(scanLocalFolder(QString)));
addPath(path);
}
~FileSystemWatcher() { ~FileSystemWatcher() {
#ifndef Q_WS_WIN #ifndef Q_WS_WIN
if(watch_timer) if(watch_timer)

Loading…
Cancel
Save