mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 08:43:08 -07:00
- Added some checking before adding torrents to finished/download lists to avoid duplicate in some circumstances
This commit is contained in:
parent
a01c7e2c60
commit
a4a98e3ada
2 changed files with 6 additions and 2 deletions
|
@ -633,8 +633,10 @@ unsigned int GUI::getCurrentTabIndex() const{
|
|||
}
|
||||
|
||||
void GUI::restoreInDownloadList(torrent_handle h){
|
||||
unsigned int row = DLListModel->rowCount();
|
||||
QString hash = QString(misc::toString(h.info_hash()).c_str());
|
||||
int row = getRowFromHash(hash);
|
||||
if(row != -1) return;
|
||||
row = DLListModel->rowCount();
|
||||
// Adding torrent to download list
|
||||
DLListModel->insertRow(row);
|
||||
DLListModel->setData(DLListModel->index(row, NAME), QVariant(h.name().c_str()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue