mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
- Added support for magnet links in search engine. Most search Web sites provides magnet links now and in the futures, they may provide only the magnet links.
This commit is contained in:
@@ -301,15 +301,21 @@ void SearchEngine::saveResultsColumnsWidth() {
|
||||
}
|
||||
|
||||
void SearchEngine::downloadTorrent(QString engine_url, QString torrent_url) {
|
||||
QProcess *downloadProcess = new QProcess(this);
|
||||
connect(downloadProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(downloadFinished(int,QProcess::ExitStatus)));
|
||||
downloaders << downloadProcess;
|
||||
QStringList params;
|
||||
params << misc::searchEngineLocation()+QDir::separator()+"nova2dl.py";
|
||||
params << engine_url;
|
||||
params << torrent_url;
|
||||
// Launch search
|
||||
downloadProcess->start("python", params, QIODevice::ReadOnly);
|
||||
if(torrent_url.startsWith("magnet:")) {
|
||||
QStringList urls;
|
||||
urls << torrent_url;
|
||||
parent->downloadFromURLList(urls);
|
||||
} else {
|
||||
QProcess *downloadProcess = new QProcess(this);
|
||||
connect(downloadProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(downloadFinished(int,QProcess::ExitStatus)));
|
||||
downloaders << downloadProcess;
|
||||
QStringList params;
|
||||
params << misc::searchEngineLocation()+QDir::separator()+"nova2dl.py";
|
||||
params << engine_url;
|
||||
params << torrent_url;
|
||||
// Launch search
|
||||
downloadProcess->start("python", params, QIODevice::ReadOnly);
|
||||
}
|
||||
}
|
||||
|
||||
void SearchEngine::searchStarted(){
|
||||
|
||||
Reference in New Issue
Block a user