Merge pull request #3832 from glassez/search

Search Engine code redesign (Issue #2433).
This commit is contained in:
sledgehammer999 2015-12-21 11:13:38 -06:00
commit db459b2400
37 changed files with 2354 additions and 2023 deletions

View file

@ -968,6 +968,10 @@ bool Session::addTorrent(QString source, const AddTorrentParams &params)
qDebug("Converting bc link to magnet link");
source = Utils::Misc::bcLinkToMagnet(source);
}
else if (((source.size() == 40) && !source.contains(QRegExp("[^0-9A-Fa-f]")))
|| ((source.size() == 32) && !source.contains(QRegExp("[^2-7A-Za-z]")))) {
source = "magnet:?xt=urn:btih:" + source;
}
if (Utils::Misc::isUrl(source)) {
Logger::instance()->addMessage(tr("Downloading '%1', please wait...", "e.g: Downloading 'xxx.torrent', please wait...").arg(source));