Make sure invalid torrent are removed from the transfer list

This commit is contained in:
Christophe Dumez
2010-01-23 19:17:31 +00:00
parent 86ca755dfe
commit 4d0cdea1c9
2 changed files with 10 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.1.2 * Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.1.2
- BUGFIX: Fix issue causing torrents not to be displayed in the list - BUGFIX: Fix issue causing torrents not to be displayed in the list
- BUGFIX: Make sure invalid torrent are removed from the transfer list
- BUGFIX: Fix overwrite check when renaming a folder in a torrent - BUGFIX: Fix overwrite check when renaming a folder in a torrent
- BUGFIX: Force a recheck after renaming files to avoid overwriting - BUGFIX: Force a recheck after renaming files to avoid overwriting
- BUGFIX: Improve "Open destination folder" behavior - BUGFIX: Improve "Open destination folder" behavior

View File

@@ -459,6 +459,7 @@ void TransferListWidget::refreshList() {
} }
} }
QStringList bad_hashes;
for(int i=0; i<listModel->rowCount(); ++i) { for(int i=0; i<listModel->rowCount(); ++i) {
int s = updateTorrent(i); int s = updateTorrent(i);
switch(s) { switch(s) {
@@ -484,10 +485,18 @@ void TransferListWidget::refreshList() {
++nb_seeding; ++nb_seeding;
++nb_inactive; ++nb_inactive;
break; break;
case STATE_INVALID:
bad_hashes << getHashFromRow(i);
break;
default: default:
break; break;
} }
} }
// Remove bad torrents from list
foreach(QString hash, bad_hashes) {
deleteTorrent(getRowFromHash(hash), false);
}
// Update status filters counters
emit torrentStatusUpdate(nb_downloading, nb_seeding, nb_active, nb_inactive); emit torrentStatusUpdate(nb_downloading, nb_seeding, nb_active, nb_inactive);
repaint(); repaint();
} }