Fix duplicate torrent detection when adding a magnet link

This commit is contained in:
Christophe Dumez
2012-02-19 19:43:57 +02:00
parent 06a376d014
commit 4e4ac771a9
3 changed files with 3 additions and 6 deletions

View File

@@ -900,7 +900,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(misc::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;