Don't merge trackers for private torrents. Closes #2928.

This commit is contained in:
sledgehammer999 2016-02-15 03:24:22 +02:00
parent f37aed868e
commit b099a766e6
2 changed files with 18 additions and 6 deletions

View file

@ -1046,6 +1046,8 @@ bool Session::addTorrent_impl(AddTorrentData addData, const MagnetUri &magnetUri
if (m_torrents.contains(hash)) {
TorrentHandle *const torrent = m_torrents.value(hash);
if (torrent->isPrivate() || (!fromMagnetUri && torrentInfo.isPrivate()))
return false;
torrent->addTrackers(fromMagnetUri ? magnetUri.trackers() : torrentInfo.trackers());
torrent->addUrlSeeds(fromMagnetUri ? magnetUri.urlSeeds() : torrentInfo.urlSeeds());
return true;