mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
- Display swarm information in download list too
This commit is contained in:
parent
bca898d8b6
commit
ca83fdecff
6 changed files with 25 additions and 24 deletions
15
src/GUI.cpp
15
src/GUI.cpp
|
@ -249,6 +249,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|||
if(!settings.value(QString::fromUtf8("Preferences/General/StartMinimized"), false).toBool()) {
|
||||
show();
|
||||
}
|
||||
scrapeTimer = new QTimer(this);
|
||||
connect(scrapeTimer, SIGNAL(timeout()), this, SLOT(scrapeTrackers()));
|
||||
scrapeTimer->start(20000);
|
||||
qDebug("GUI Built");
|
||||
}
|
||||
|
||||
|
@ -260,6 +263,8 @@ GUI::~GUI() {
|
|||
BTSession->saveDHTEntry();
|
||||
BTSession->saveSessionState();
|
||||
BTSession->saveFastResumeData();
|
||||
scrapeTimer->stop();
|
||||
delete scrapeTimer;
|
||||
delete dlSpeedLbl;
|
||||
delete upSpeedLbl;
|
||||
delete ratioLbl;
|
||||
|
@ -319,6 +324,16 @@ void GUI::displayRSSTab(bool enable) {
|
|||
}
|
||||
}
|
||||
|
||||
void GUI::scrapeTrackers() {
|
||||
std::vector<torrent_handle> torrents = BTSession->getTorrents();
|
||||
std::vector<torrent_handle>::iterator torrentIT;
|
||||
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
|
||||
QTorrentHandle h = QTorrentHandle(*torrentIT);
|
||||
if(!h.is_valid()) continue;
|
||||
h.scrape_tracker();
|
||||
}
|
||||
}
|
||||
|
||||
void GUI::updateRatio() {
|
||||
// Update ratio info
|
||||
float ratio = 1.;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue