qBittorrent
|
Public Slots | |
void | setWatchedFolder (const QString &path, const TorrentFilesWatcher::WatchedFolderOptions &options) |
void | removeWatchedFolder (const QString &path) |
Signals | |
void | magnetFound (const BitTorrent::MagnetUri &magnetURI, const BitTorrent::AddTorrentParams &addTorrentParams) |
void | torrentFound (const BitTorrent::TorrentInfo &torrentInfo, const BitTorrent::AddTorrentParams &addTorrentParams) |
Public Member Functions | |
Worker () | |
Private Member Functions | |
void | onTimeout () |
void | scheduleWatchedFolderProcessing (const QString &path) |
void | processWatchedFolder (const QString &path) |
void | processFolder (const QString &path, const QString &watchedFolderPath, const TorrentFilesWatcher::WatchedFolderOptions &options) |
void | processFailedTorrents () |
void | addWatchedFolder (const QString &watchedFolderID, const TorrentFilesWatcher::WatchedFolderOptions &options) |
void | updateWatchedFolder (const QString &watchedFolderID, const TorrentFilesWatcher::WatchedFolderOptions &options) |
Private Attributes | |
QFileSystemWatcher * | m_watcher = nullptr |
QTimer * | m_watchTimer = nullptr |
QHash< QString, TorrentFilesWatcher::WatchedFolderOptions > | m_watchedFolders |
QSet< QString > | m_watchedByTimeoutFolders |
QTimer * | m_retryTorrentTimer = nullptr |
QHash< QString, QHash< QString, int > > | m_failedTorrents |
Definition at line 202 of file torrentfileswatcher.cpp.
TorrentFilesWatcher::Worker::Worker | ( | ) |
Definition at line 445 of file torrentfileswatcher.cpp.
References m_retryTorrentTimer, m_watcher, m_watchTimer, onTimeout(), processFailedTorrents(), and scheduleWatchedFolderProcessing().
|
private |
Definition at line 634 of file torrentfileswatcher.cpp.
References Utils::Fs::isNetworkFileSystem(), LogMsg(), TorrentFilesWatcher::m_watchedFolders, TorrentFilesWatcher::WatchedFolderOptions::recursive, Utils::Fs::toNativePath(), and WATCH_INTERVAL.
|
signal |
Referenced by TorrentFilesWatcher::TorrentFilesWatcher().
|
private |
Definition at line 456 of file torrentfileswatcher.cpp.
References asConst().
Referenced by Worker().
|
private |
Definition at line 573 of file torrentfileswatcher.cpp.
References TorrentFilesWatcher::WatchedFolderOptions::addTorrentParams, BitTorrent::AddTorrentParams::category, Utils::Fs::forceRemove(), BitTorrent::TorrentInfo::loadFromFile(), LogMsg(), TorrentFilesWatcher::m_watchedFolders, MAX_FAILED_RETRIES, Algorithm::removeIf(), BitTorrent::AddTorrentParams::savePath, BitTorrent::AddTorrentParams::useAutoTMM, anonymous_namespace{preferences.cpp}::value(), and WATCH_INTERVAL.
Referenced by Worker().
|
private |
Definition at line 501 of file torrentfileswatcher.cpp.
References TorrentFilesWatcher::WatchedFolderOptions::addTorrentParams, BitTorrent::AddTorrentParams::category, file(), Utils::Fs::forceRemove(), BitTorrent::TorrentInfo::loadFromFile(), LogMsg(), TorrentFilesWatcher::m_watchedFolders, TorrentFilesWatcher::WatchedFolderOptions::recursive, BitTorrent::AddTorrentParams::savePath, and BitTorrent::AddTorrentParams::useAutoTMM.
|
private |
Definition at line 492 of file torrentfileswatcher.cpp.
References TorrentFilesWatcher::m_watchedFolders, and WATCH_INTERVAL.
|
slot |
Definition at line 470 of file torrentfileswatcher.cpp.
References TorrentFilesWatcher::m_watchedFolders.
Referenced by TorrentFilesWatcher::removeWatchedFolder().
|
private |
Definition at line 484 of file torrentfileswatcher.cpp.
Referenced by Worker().
|
slot |
Definition at line 462 of file torrentfileswatcher.cpp.
References TorrentFilesWatcher::m_watchedFolders.
Referenced by TorrentFilesWatcher::doSetWatchedFolder().
|
signal |
Referenced by TorrentFilesWatcher::TorrentFilesWatcher().
|
private |
Definition at line 658 of file torrentfileswatcher.cpp.
References Utils::Fs::isNetworkFileSystem(), TorrentFilesWatcher::m_watchedFolders, TorrentFilesWatcher::WatchedFolderOptions::recursive, and WATCH_INTERVAL.
|
private |
Definition at line 234 of file torrentfileswatcher.cpp.
|
private |
Definition at line 233 of file torrentfileswatcher.cpp.
Referenced by Worker().
|
private |
Definition at line 230 of file torrentfileswatcher.cpp.
|
private |
Definition at line 229 of file torrentfileswatcher.cpp.
|
private |
Definition at line 227 of file torrentfileswatcher.cpp.
Referenced by Worker().
|
private |
Definition at line 228 of file torrentfileswatcher.cpp.
Referenced by Worker().