mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
When duplicate torrent is added set metadata to existing one
PR #17454. Closes #907.
This commit is contained in:
committed by
GitHub
parent
748226be29
commit
1c0479a795
@@ -435,6 +435,9 @@ bool AddNewTorrentDialog::loadTorrentImpl()
|
||||
BitTorrent::Torrent *const torrent = BitTorrent::Session::instance()->findTorrent(torrentID);
|
||||
if (torrent)
|
||||
{
|
||||
// Trying to set metadata to existing torrent in case if it has none
|
||||
torrent->setMetadata(m_torrentInfo);
|
||||
|
||||
if (torrent->isPrivate() || m_torrentInfo.isPrivate())
|
||||
{
|
||||
RaisedMessageBox::warning(this, tr("Torrent is already present"), tr("Torrent '%1' is already in the transfer list. Trackers cannot be merged because it is a private torrent.").arg(torrent->name()), QMessageBox::Ok);
|
||||
|
||||
Reference in New Issue
Block a user