User can force tracker reannounce

This commit is contained in:
Christophe Dumez 2010-05-18 09:35:55 +00:00
parent e846c67bfa
commit c2da227254
6 changed files with 64 additions and 8 deletions

View file

@ -190,6 +190,7 @@ void PropertiesWidget::clear() {
lbl_dllimit->clear();
lbl_elapsed->clear();
lbl_connections->clear();
reannounce_lbl->clear();
shareRatio->clear();
listWebSeeds->clear();
PropListModel->clear();
@ -215,6 +216,12 @@ void PropertiesWidget::updateSavePath(QTorrentHandle& _h) {
}
}
void PropertiesWidget::on_reannounce_btn_clicked() {
if(h.is_valid()) {
h.force_reannounce();
}
}
void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) {
clear();
h = _h;
@ -329,6 +336,8 @@ void PropertiesWidget::loadDynamicData() {
lbl_connections->setText(QString::number(h.num_connections())+" ("+tr("%1 max", "e.g. 10 max").arg(QString::number(h.connections_limit()))+")");
else
lbl_connections->setText(QString::number(h.num_connections()));
// Update next announce time
reannounce_lbl->setText(h.next_announce());
// Update ratio info
const double ratio = BTSession->getRealRatio(h.hash());
if(ratio > 100.)