mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
parent
e628b7d527
commit
209850064a
@ -299,6 +299,8 @@ void AppController::preferencesAction()
|
||||
|
||||
// Advanced settings
|
||||
// qBitorrent preferences
|
||||
// Resume data storage type
|
||||
data[u"resume_data_storage_type"_qs] = Utils::String::fromEnum(session->resumeDataStorageType());
|
||||
// Physical memory (RAM) usage limit
|
||||
data[u"memory_working_set_limit"_qs] = app()->memoryWorkingSetLimit();
|
||||
// Current network interface
|
||||
@ -776,6 +778,9 @@ void AppController::setPreferencesAction()
|
||||
|
||||
// Advanced settings
|
||||
// qBittorrent preferences
|
||||
// Resume data storage type
|
||||
if (hasKey(u"resume_data_storage_type"_qs))
|
||||
session->setResumeDataStorageType(Utils::String::toEnum(it.value().toString(), BitTorrent::ResumeDataStorageType::Legacy));
|
||||
// Physical memory (RAM) usage limit
|
||||
if (hasKey(u"memory_working_set_limit"_qs))
|
||||
app()->setMemoryWorkingSetLimit(it.value().toInt());
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include "base/utils/version.h"
|
||||
#include "api/isessionmanager.h"
|
||||
|
||||
inline const Utils::Version<3, 2> API_VERSION {2, 8, 18};
|
||||
inline const Utils::Version<3, 2> API_VERSION {2, 8, 19};
|
||||
|
||||
class APIController;
|
||||
class AuthController;
|
||||
|
@ -879,6 +879,17 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
<fieldset class="settings">
|
||||
<legend>QBT_TR(qBittorrent Section)QBT_TR[CONTEXT=OptionsDialog] (<a href="https://github.com/qbittorrent/qBittorrent/wiki/Explanation-of-Options-in-qBittorrent#Advanced" target="_blank">QBT_TR(Open documentation)QBT_TR[CONTEXT=HttpServer]</a>)</legend>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="resumeDataStorageType">QBT_TR(Resume data storage type (requires restart):)QBT_TR[CONTEXT=OptionsDialog]</label>
|
||||
</td>
|
||||
<td>
|
||||
<select id="resumeDataStorageType" style="width: 15em;">
|
||||
<option value="Legacy">QBT_TR(Fastresume files)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||
<option value="SQLite">QBT_TR(SQLite database (experimental))QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="memoryWorkingSetLimit">QBT_TR(Physical memory (RAM) usage limit (applied if libtorrent >= 2.0):)QBT_TR[CONTEXT=OptionsDialog] <a href="https://wikipedia.org/wiki/Working_set" target="_blank">(?)</a></label>
|
||||
@ -2026,6 +2037,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
|
||||
// Advanced settings
|
||||
// qBittorrent section
|
||||
$('resumeDataStorageType').setProperty('value', pref.resume_data_storage_type);
|
||||
$('memoryWorkingSetLimit').setProperty('value', pref.memory_working_set_limit);
|
||||
updateNetworkInterfaces(pref.current_network_interface);
|
||||
updateInterfaceAddresses(pref.current_network_interface, pref.current_interface_address);
|
||||
@ -2453,6 +2465,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
|
||||
// Update advanced settings
|
||||
// qBittorrent section
|
||||
settings.set('resume_data_storage_type', $('resumeDataStorageType').getProperty('value'));
|
||||
settings.set('memory_working_set_limit', $('memoryWorkingSetLimit').getProperty('value'));
|
||||
settings.set('current_network_interface', $('networkInterface').getProperty('value'));
|
||||
settings.set('current_interface_address', $('optionalIPAddressToBind').getProperty('value'));
|
||||
|
Loading…
Reference in New Issue
Block a user