mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Show info hash in log when added a duplicate torrent
Closes #22161. PR #22505.
This commit is contained in:
@@ -2790,8 +2790,8 @@ bool SessionImpl::addTorrent_impl(const TorrentDescriptor &source, const AddTorr
|
||||
if (!isMergeTrackersEnabled())
|
||||
{
|
||||
const QString message = tr("Merging of trackers is disabled");
|
||||
LogMsg(tr("Detected an attempt to add a duplicate torrent. Existing torrent: %1. Result: %2")
|
||||
.arg(torrent->name(), message));
|
||||
LogMsg(tr("Detected an attempt to add a duplicate torrent. Existing torrent: \"%1\". Torrent infohash: %2. Result: %3")
|
||||
.arg(torrent->name(), torrent->infoHash().toString(), message));
|
||||
emit addTorrentFailed(infoHash, {AddTorrentError::DuplicateTorrent, message});
|
||||
return false;
|
||||
}
|
||||
@@ -2800,8 +2800,8 @@ bool SessionImpl::addTorrent_impl(const TorrentDescriptor &source, const AddTorr
|
||||
if (isPrivate)
|
||||
{
|
||||
const QString message = tr("Trackers cannot be merged because it is a private torrent");
|
||||
LogMsg(tr("Detected an attempt to add a duplicate torrent. Existing torrent: %1. Result: %2")
|
||||
.arg(torrent->name(), message));
|
||||
LogMsg(tr("Detected an attempt to add a duplicate torrent. Existing torrent: \"%1\". Torrent infohash: %2. Result: %3")
|
||||
.arg(torrent->name(), torrent->infoHash().toString(), message));
|
||||
emit addTorrentFailed(infoHash, {AddTorrentError::DuplicateTorrent, message});
|
||||
return false;
|
||||
}
|
||||
@@ -2811,8 +2811,8 @@ bool SessionImpl::addTorrent_impl(const TorrentDescriptor &source, const AddTorr
|
||||
torrent->addUrlSeeds(source.urlSeeds());
|
||||
|
||||
const QString message = tr("Trackers are merged from new source");
|
||||
LogMsg(tr("Detected an attempt to add a duplicate torrent. Existing torrent: %1. Result: %2")
|
||||
.arg(torrent->name(), message));
|
||||
LogMsg(tr("Detected an attempt to add a duplicate torrent. Existing torrent: \"%1\". Torrent infohash: %2. Result: %3")
|
||||
.arg(torrent->name(), torrent->infoHash().toString(), message));
|
||||
emit addTorrentFailed(infoHash, {AddTorrentError::DuplicateTorrent, message});
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user