- Added some checking before adding torrents to finished/download lists to avoid duplicate in some circumstances

This commit is contained in:
Christophe Dumez 2007-08-19 16:50:05 +00:00
parent a01c7e2c60
commit a4a98e3ada
2 changed files with 6 additions and 2 deletions

View file

@ -75,7 +75,9 @@ FinishedTorrents::~FinishedTorrents(){
}
void FinishedTorrents::addFinishedTorrent(QString hash){
int row = finishedListModel->rowCount();
int row = getRowFromHash(hash);
if(row != -1) return;
row = finishedListModel->rowCount();
torrent_handle h = BTSession->getTorrentHandle(hash);
// Adding torrent to download list
finishedListModel->insertRow(row);