mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 13:18:06 -06:00
Add option for hashing_threads, use 10 asyc IO threads
Add option for setting lt::settings_pack::hashing_threads introduced by libtorrent 2.0. It has no effect for earlier libtorrent versions. Use 10 async IO threads, as per #11461. Closes #11461.
This commit is contained in:
@@ -277,6 +277,8 @@ void AppController::preferencesAction()
|
||||
// libtorrent preferences
|
||||
// Async IO threads
|
||||
data["async_io_threads"] = session->asyncIOThreads();
|
||||
// Hashing threads
|
||||
data["hashing_threads"] = session->hashingThreads();
|
||||
// File pool size
|
||||
data["file_pool_size"] = session->filePoolSize();
|
||||
// Checking memory usage
|
||||
@@ -701,6 +703,9 @@ void AppController::setPreferencesAction()
|
||||
// Async IO threads
|
||||
if (hasKey("async_io_threads"))
|
||||
session->setAsyncIOThreads(it.value().toInt());
|
||||
// Hashing threads
|
||||
if (hasKey("hashing_threads"))
|
||||
session->setHashingThreads(it.value().toInt());
|
||||
// File pool size
|
||||
if (hasKey("file_pool_size"))
|
||||
session->setFilePoolSize(it.value().toInt());
|
||||
|
||||
@@ -943,6 +943,14 @@
|
||||
<input type="text" id="asyncIOThreads" style="width: 15em;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="hashingThreads">QBT_TR(Hashing threads (requires libtorrent >= 2.0):)QBT_TR[CONTEXT=OptionsDialog] <a href="https://www.libtorrent.org/reference-Settings.html#hashing_threads" target="_blank">(?)</a></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="hashingThreads" style="width: 15em;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="filePoolSize">QBT_TR(File pool size:)QBT_TR[CONTEXT=OptionsDialog] <a href="https://www.libtorrent.org/reference-Settings.html#file_pool_size" target="_blank">(?)</a></label>
|
||||
@@ -1871,6 +1879,7 @@
|
||||
$('resolvePeerCountries').setProperty('checked', pref.resolve_peer_countries);
|
||||
// libtorrent section
|
||||
$('asyncIOThreads').setProperty('value', pref.async_io_threads);
|
||||
$('hashingThreads').setProperty('value', pref.hashing_threads);
|
||||
$('filePoolSize').setProperty('value', pref.file_pool_size);
|
||||
$('outstandMemoryWhenCheckingTorrents').setProperty('value', pref.checking_memory_use);
|
||||
$('diskCache').setProperty('value', pref.disk_cache);
|
||||
@@ -2257,6 +2266,7 @@
|
||||
|
||||
// libtorrent section
|
||||
settings.set('async_io_threads', $('asyncIOThreads').getProperty('value'));
|
||||
settings.set('hashing_threads', $('hashingThreads').getProperty('value'));
|
||||
settings.set('file_pool_size', $('filePoolSize').getProperty('value'));
|
||||
settings.set('checking_memory_use', $('outstandMemoryWhenCheckingTorrents').getProperty('value'));
|
||||
settings.set('disk_cache', $('diskCache').getProperty('value'));
|
||||
|
||||
Reference in New Issue
Block a user