mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 13:41:26 -07:00
Allow users to specify Python executable path
Closes #19195. PR #19644.
This commit is contained in:
parent
529e49aea7
commit
b3fda76027
10 changed files with 77 additions and 16 deletions
|
@ -404,6 +404,8 @@ void AppController::preferencesAction()
|
|||
data[u"enable_embedded_tracker"_s] = session->isTrackerEnabled();
|
||||
data[u"embedded_tracker_port"_s] = pref->getTrackerPort();
|
||||
data[u"embedded_tracker_port_forwarding"_s] = pref->isTrackerPortForwardingEnabled();
|
||||
// Python executable path
|
||||
data[u"python_executable_path"_s] = pref->getPythonExecutablePath().toString();
|
||||
// Choking algorithm
|
||||
data[u"upload_slots_behavior"_s] = static_cast<int>(session->chokingAlgorithm());
|
||||
// Seed choking algorithm
|
||||
|
@ -990,6 +992,9 @@ void AppController::setPreferencesAction()
|
|||
pref->setTrackerPortForwardingEnabled(it.value().toBool());
|
||||
if (hasKey(u"enable_embedded_tracker"_s))
|
||||
session->setTrackerEnabled(it.value().toBool());
|
||||
// Python executable path
|
||||
if (hasKey(u"python_executable_path"_s))
|
||||
pref->setPythonExecutablePath(Path(it.value().toString()));
|
||||
// Choking algorithm
|
||||
if (hasKey(u"upload_slots_behavior"_s))
|
||||
session->setChokingAlgorithm(static_cast<BitTorrent::ChokingAlgorithm>(it.value().toInt()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue