mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -06:00
Change placement of stop tracker timeout
This commit is contained in:
@@ -270,8 +270,6 @@ void AppController::preferencesAction()
|
||||
// libtorrent preferences
|
||||
// Async IO threads
|
||||
data["async_io_threads"] = session->asyncIOThreads();
|
||||
// stop tracker timeout
|
||||
data["stop_tracker_timeout"] = session->stopTrackerTimeout();
|
||||
// File pool size
|
||||
data["file_pool_size"] = session->filePoolSize();
|
||||
// Checking memory usage
|
||||
@@ -311,6 +309,8 @@ void AppController::preferencesAction()
|
||||
data["announce_to_all_trackers"] = session->announceToAllTrackers();
|
||||
data["announce_to_all_tiers"] = session->announceToAllTiers();
|
||||
data["announce_ip"] = session->announceIP();
|
||||
// Stop tracker timeout
|
||||
data["stop_tracker_timeout"] = session->stopTrackerTimeout();
|
||||
|
||||
setResult(data);
|
||||
}
|
||||
@@ -649,8 +649,8 @@ void AppController::setPreferencesAction()
|
||||
});
|
||||
const QString ifaceName = (ifacesIter != ifaces.cend()) ? ifacesIter->humanReadableName() : QString {};
|
||||
|
||||
session->setNetworkInterface(ifaceValue);
|
||||
session->setNetworkInterfaceName(ifaceName);
|
||||
session->setNetworkInterface(ifaceValue);
|
||||
session->setNetworkInterfaceName(ifaceName);
|
||||
}
|
||||
// Current network interface address
|
||||
if (hasKey("current_interface_address")) {
|
||||
@@ -671,9 +671,6 @@ void AppController::setPreferencesAction()
|
||||
// Async IO threads
|
||||
if (hasKey("async_io_threads"))
|
||||
session->setAsyncIOThreads(it.value().toInt());
|
||||
// Stop tracker timeout
|
||||
if (hasKey("stop_tracker_timeout"))
|
||||
session->setStopTrackerTimeout(it.value().toInt());
|
||||
// File pool size
|
||||
if (hasKey("file_pool_size"))
|
||||
session->setFilePoolSize(it.value().toInt());
|
||||
@@ -738,6 +735,9 @@ void AppController::setPreferencesAction()
|
||||
const QHostAddress announceAddr {it.value().toString().trimmed()};
|
||||
session->setAnnounceIP(announceAddr.isNull() ? QString {} : announceAddr.toString());
|
||||
}
|
||||
// Stop tracker timeout
|
||||
if (hasKey("stop_tracker_timeout"))
|
||||
session->setStopTrackerTimeout(it.value().toInt());
|
||||
|
||||
// Save preferences
|
||||
pref->apply();
|
||||
|
||||
@@ -878,14 +878,6 @@
|
||||
<input type="text" id="asyncIOThreads" style="width: 15em;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="stopTrackerTimeout">QBT_TR(Stop tracker timeout:)QBT_TR[CONTEXT=OptionsDialog] <a href="https://www.libtorrent.org/reference-Settings.html#stop_tracker_timeout" target="_blank">(?)</a></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="stopTrackerTimeout" 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>
|
||||
@@ -1080,6 +1072,14 @@
|
||||
<input type="text" id="announceIP" style="width: 15em;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="stopTrackerTimeout">QBT_TR(Stop tracker timeout:)QBT_TR[CONTEXT=OptionsDialog] <a href="https://www.libtorrent.org/reference-Settings.html#stop_tracker_timeout" target="_blank">(?)</a></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="stopTrackerTimeout" style="width: 15em;" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -1742,7 +1742,6 @@
|
||||
$('resolvePeerCountries').setProperty('checked', pref.resolve_peer_countries);
|
||||
// libtorrent section
|
||||
$('asyncIOThreads').setProperty('value', pref.async_io_threads);
|
||||
$('stopTrackerTimeout').setProperty('value', pref.stop_tracker_timeout);
|
||||
$('filePoolSize').setProperty('value', pref.file_pool_size);
|
||||
$('outstandMemoryWhenCheckingTorrents').setProperty('value', pref.checking_memory_use);
|
||||
$('diskCache').setProperty('value', pref.disk_cache);
|
||||
@@ -1766,6 +1765,7 @@
|
||||
$('announceAllTrackers').setProperty('checked', pref.announce_to_all_trackers);
|
||||
$('announceAllTiers').setProperty('checked', pref.announce_to_all_tiers);
|
||||
$('announceIP').setProperty('value', pref.announce_ip);
|
||||
$('stopTrackerTimeout').setProperty('value', pref.stop_tracker_timeout);
|
||||
}
|
||||
}
|
||||
}).send();
|
||||
@@ -2107,7 +2107,6 @@
|
||||
|
||||
// libtorrent section
|
||||
settings.set('async_io_threads', $('asyncIOThreads').getProperty('value'));
|
||||
settings.set('stop_tracker_timeout', $('stopTrackerTimeout').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'));
|
||||
@@ -2131,6 +2130,7 @@
|
||||
settings.set('announce_to_all_trackers', $('announceAllTrackers').getProperty('checked'));
|
||||
settings.set('announce_to_all_tiers', $('announceAllTiers').getProperty('checked'));
|
||||
settings.set('announce_ip', $('announceIP').getProperty('value'));
|
||||
settings.set('stop_tracker_timeout', $('stopTrackerTimeout').getProperty('value'));
|
||||
|
||||
// Send it to qBT
|
||||
const json_str = JSON.encode(settings);
|
||||
|
||||
Reference in New Issue
Block a user