mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Optimize converter between QString and sha1_hash
This commit is contained in:
@@ -909,7 +909,7 @@ QTorrentHandle QBtSession::addMagnetUri(QString magnet_uri, bool resumed) {
|
||||
Q_ASSERT(magnet_uri.startsWith("magnet:", Qt::CaseInsensitive));
|
||||
|
||||
// Check for duplicate torrent
|
||||
if(s->find_torrent(misc::toSha1Hash(hash)).is_valid()) {
|
||||
if(s->find_torrent(QStringToSha1(hash)).is_valid()) {
|
||||
qDebug("/!\\ Torrent is already in download list");
|
||||
addConsoleMessage(tr("'%1' is already in download list.", "e.g: 'xxx.avi' is already in download list.").arg(magnet_uri));
|
||||
return h;
|
||||
|
||||
Reference in New Issue
Block a user