mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 01:44:26 +00: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
@ -138,6 +138,9 @@ TransferListWidget::~TransferListWidget() {
|
|||||||
|
|
||||||
void TransferListWidget::addTorrent(QTorrentHandle& h) {
|
void TransferListWidget::addTorrent(QTorrentHandle& h) {
|
||||||
if(!h.is_valid()) return;
|
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();
|
int row = listModel->rowCount();
|
||||||
try {
|
try {
|
||||||
// Adding torrent to transfer list
|
// Adding torrent to transfer list
|
||||||
|
Loading…
x
Reference in New Issue
Block a user