mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 17:23:07 -07:00
- Make sure the torrent is not already in the list before trying to add it
This commit is contained in:
parent
8650b20904
commit
68092f3b5c
1 changed files with 3 additions and 0 deletions
|
@ -138,6 +138,9 @@ TransferListWidget::~TransferListWidget() {
|
|||
|
||||
void TransferListWidget::addTorrent(QTorrentHandle& h) {
|
||||
if(!h.is_valid()) return;
|
||||
// Check that the torrent is not already there
|
||||
if(getRowFromHash(h.hash()) >= 0) return;
|
||||
// Actuall add the torrent
|
||||
int row = listModel->rowCount();
|
||||
try {
|
||||
// Adding torrent to transfer list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue