mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-06 03:44:29 +00:00
commit
aed971883d
@ -3506,7 +3506,7 @@ void Session::setMaxRatioAction(MaxRatioAction act)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If this functions returns true, we cannot add torrent to session,
|
// If this functions returns true, we cannot add torrent to session,
|
||||||
// but it is still possible to merge trackers in some case
|
// but it is still possible to merge trackers in some cases
|
||||||
bool Session::isKnownTorrent(const InfoHash &hash) const
|
bool Session::isKnownTorrent(const InfoHash &hash) const
|
||||||
{
|
{
|
||||||
return (m_torrents.contains(hash)
|
return (m_torrents.contains(hash)
|
||||||
|
@ -296,16 +296,16 @@ bool AddNewTorrentDialog::loadTorrent(const QString &torrentPath)
|
|||||||
BitTorrent::TorrentHandle *const torrent = BitTorrent::Session::instance()->findTorrent(m_hash);
|
BitTorrent::TorrentHandle *const torrent = BitTorrent::Session::instance()->findTorrent(m_hash);
|
||||||
if (torrent) {
|
if (torrent) {
|
||||||
if (torrent->isPrivate() || m_torrentInfo.isPrivate()) {
|
if (torrent->isPrivate() || m_torrentInfo.isPrivate()) {
|
||||||
RaisedMessageBox::critical(this, tr("Already in the download list"), tr("Torrent '%1' is already in the download list. Trackers weren't merged because it is a private torrent.").arg(torrent->name()), QMessageBox::Ok);
|
RaisedMessageBox::warning(this, tr("Torrent is already present"), tr("Torrent '%1' is already in the transfer list. Trackers haven't been merged because it is a private torrent.").arg(torrent->name()), QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
torrent->addTrackers(m_torrentInfo.trackers());
|
torrent->addTrackers(m_torrentInfo.trackers());
|
||||||
torrent->addUrlSeeds(m_torrentInfo.urlSeeds());
|
torrent->addUrlSeeds(m_torrentInfo.urlSeeds());
|
||||||
RaisedMessageBox::information(this, tr("Already in the download list"), tr("Torrent '%1' is already in the download list. Trackers were merged.").arg(torrent->name()), QMessageBox::Ok);
|
RaisedMessageBox::information(this, tr("Torrent is already present"), tr("Torrent '%1' is already in the transfer list. Trackers have been merged.").arg(torrent->name()), QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RaisedMessageBox::critical(this, tr("Cannot add torrent"), tr("Cannot add this torrent. Perhaps it is already in adding state."), QMessageBox::Ok);
|
RaisedMessageBox::information(this, tr("Torrent is already present"), tr("Torrent is already queued for processing."), QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -330,16 +330,16 @@ bool AddNewTorrentDialog::loadMagnet(const BitTorrent::MagnetUri &magnetUri)
|
|||||||
BitTorrent::TorrentHandle *const torrent = BitTorrent::Session::instance()->findTorrent(m_hash);
|
BitTorrent::TorrentHandle *const torrent = BitTorrent::Session::instance()->findTorrent(m_hash);
|
||||||
if (torrent) {
|
if (torrent) {
|
||||||
if (torrent->isPrivate()) {
|
if (torrent->isPrivate()) {
|
||||||
RaisedMessageBox::critical(this, tr("Already in the download list"), tr("Torrent '%1' is already in the download list. Trackers weren't merged because it is a private torrent.").arg(torrent->name()), QMessageBox::Ok);
|
RaisedMessageBox::warning(this, tr("Torrent is already present"), tr("Torrent '%1' is already in the transfer list. Trackers haven't been merged because it is a private torrent.").arg(torrent->name()), QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
torrent->addTrackers(magnetUri.trackers());
|
torrent->addTrackers(magnetUri.trackers());
|
||||||
torrent->addUrlSeeds(magnetUri.urlSeeds());
|
torrent->addUrlSeeds(magnetUri.urlSeeds());
|
||||||
RaisedMessageBox::information(this, tr("Already in the download list"), tr("Magnet link '%1' is already in the download list. Trackers were merged.").arg(torrent->name()), QMessageBox::Ok);
|
RaisedMessageBox::information(this, tr("Torrent is already present"), tr("Magnet link '%1' is already in the transfer list. Trackers have been merged.").arg(torrent->name()), QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RaisedMessageBox::critical(this, tr("Cannot add torrent"), tr("Cannot add this torrent. Perhaps it is already in adding."), QMessageBox::Ok);
|
RaisedMessageBox::information(this, tr("Torrent is already present"), tr("Magnet link is already queued for processing."), QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user