Python packages should be installed as modules, and not use source files
This commit is contained in:
@@ -19,26 +19,18 @@ function getMagnetFromURL(url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function find(searchterm, callback) {
|
async function find(searchterm, callback) {
|
||||||
const options = {
|
const options = { args: [searchterm, "-s", "jackett", "--print"] };
|
||||||
pythonPath: "../torrent_search/env/bin/python3",
|
|
||||||
scriptPath: "../torrent_search",
|
|
||||||
args: [searchterm, "-s", "jackett", "--print"]
|
|
||||||
};
|
|
||||||
|
|
||||||
PythonShell.run("torrentSearch/search.py", options, callback);
|
PythonShell.run("torrentsearch", options, callback);
|
||||||
// PythonShell does not support return
|
// PythonShell does not support return
|
||||||
}
|
}
|
||||||
|
|
||||||
async function callPythonAddMagnet(url, callback) {
|
async function callPythonAddMagnet(url, callback) {
|
||||||
getMagnetFromURL(url)
|
getMagnetFromURL(url)
|
||||||
.then(magnet => {
|
.then(magnet => {
|
||||||
const options = {
|
const options = { args: ["add", magnet] };
|
||||||
pythonPath: "../delugeClient/env/bin/python3",
|
|
||||||
scriptPath: "../delugeClient",
|
|
||||||
args: ["add", magnet]
|
|
||||||
};
|
|
||||||
|
|
||||||
PythonShell.run("deluge_cli.py", options, callback);
|
PythonShell.run("delugeClient", options, callback);
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
throw new Error(err);
|
throw new Error(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user