mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 05:38:06 -06:00
Use python3 and python2 instead of python on Linux
Prefer python3 over python2 when both are available. Both python2 and python3 should always exists. More info at: http://legacy.python.org/dev/peps/pep-0394/
This commit is contained in:
@@ -232,7 +232,7 @@ void SearchEngine::on_search_button_clicked() {
|
||||
// Changing the text of the current label
|
||||
currentSearchTab->getCurrentLabel()->setText(tr("Results")+" <i>(0)</i>:");
|
||||
// Launch search
|
||||
searchProcess->start("python", params, QIODevice::ReadOnly);
|
||||
searchProcess->start(Utils::Misc::pythonExecutable(), params, QIODevice::ReadOnly);
|
||||
searchTimeout->start(180000); // 3min
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ void SearchEngine::downloadTorrent(QString engine_url, QString torrent_url) {
|
||||
params << engine_url;
|
||||
params << torrent_url;
|
||||
// Launch search
|
||||
downloadProcess->start("python", params, QIODevice::ReadOnly);
|
||||
downloadProcess->start(Utils::Misc::pythonExecutable(), params, QIODevice::ReadOnly);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <QDebug>
|
||||
|
||||
#include "core/utils/fs.h"
|
||||
#include "core/utils/misc.h"
|
||||
#include "core/preferences.h"
|
||||
|
||||
class SearchCategories: public QObject, public QHash<QString, QString> {
|
||||
@@ -150,7 +151,7 @@ public slots:
|
||||
QStringList params;
|
||||
params << Utils::Fs::toNativePath(Utils::Fs::searchEngineLocation()+"/nova2.py");
|
||||
params << "--capabilities";
|
||||
nova.start("python", params, QIODevice::ReadOnly);
|
||||
nova.start(Utils::Misc::pythonExecutable(), params, QIODevice::ReadOnly);
|
||||
nova.waitForStarted();
|
||||
nova.waitForFinished();
|
||||
QString capabilities = QString(nova.readAll());
|
||||
|
||||
Reference in New Issue
Block a user