mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07: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:
parent
fca24a8f84
commit
88c56d8250
3 changed files with 109 additions and 102 deletions
|
@ -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(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue