mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
- Make sure the torrent is not already in the list before trying to add it
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user