- Added connection limits for each torrent

This commit is contained in:
Christophe Dumez 2006-09-30 22:42:38 +00:00
parent 6244d1226f
commit 821854703b

View File

@ -1261,6 +1261,8 @@ void GUI::addTorrents(const QStringList& pathsList, bool fromScanDir, const QStr
int row = DLListModel->rowCount(); int row = DLListModel->rowCount();
// Adding files to bittorrent session // Adding files to bittorrent session
h = s->add_torrent(t, fs::path(saveDir.path().toStdString()), resume_data); h = s->add_torrent(t, fs::path(saveDir.path().toStdString()), resume_data);
h.set_max_connections(60);
h.set_max_uploads(-1);
//qDebug("Added to session"); //qDebug("Added to session");
torrent_status torrentStatus = h.status(); torrent_status torrentStatus = h.status();
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)torrentStatus.progress)); DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)torrentStatus.progress));