mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 14:04:23 +00:00
Add transfer list refresh interval settings to WebUI
Specially useful for qbt-nox users PR #16713. Co-authored-by: An0n <79678786+an0n666@users.noreply.github.com>
This commit is contained in:
parent
0e3ce019e4
commit
3f7376f26b
@ -638,12 +638,13 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||||||
// Recheck completed torrents
|
// Recheck completed torrents
|
||||||
m_checkBoxRecheckCompleted.setChecked(pref->recheckTorrentsOnCompletion());
|
m_checkBoxRecheckCompleted.setChecked(pref->recheckTorrentsOnCompletion());
|
||||||
addRow(RECHECK_COMPLETED, tr("Recheck torrents on completion"), &m_checkBoxRecheckCompleted);
|
addRow(RECHECK_COMPLETED, tr("Recheck torrents on completion"), &m_checkBoxRecheckCompleted);
|
||||||
// Transfer list refresh interval
|
// Refresh interval
|
||||||
m_spinBoxListRefresh.setMinimum(30);
|
m_spinBoxListRefresh.setMinimum(30);
|
||||||
m_spinBoxListRefresh.setMaximum(99999);
|
m_spinBoxListRefresh.setMaximum(99999);
|
||||||
m_spinBoxListRefresh.setValue(session->refreshInterval());
|
m_spinBoxListRefresh.setValue(session->refreshInterval());
|
||||||
m_spinBoxListRefresh.setSuffix(tr(" ms", " milliseconds"));
|
m_spinBoxListRefresh.setSuffix(tr(" ms", " milliseconds"));
|
||||||
addRow(LIST_REFRESH, tr("Transfer list refresh interval"), &m_spinBoxListRefresh);
|
m_spinBoxListRefresh.setToolTip(tr("It controls the internal state update interval which in turn will affect UI updates"));
|
||||||
|
addRow(LIST_REFRESH, tr("Refresh interval"), &m_spinBoxListRefresh);
|
||||||
// Resolve Peer countries
|
// Resolve Peer countries
|
||||||
m_checkBoxResolveCountries.setChecked(pref->resolvePeerCountries());
|
m_checkBoxResolveCountries.setChecked(pref->resolvePeerCountries());
|
||||||
addRow(RESOLVE_COUNTRIES, tr("Resolve peer countries"), &m_checkBoxResolveCountries);
|
addRow(RESOLVE_COUNTRIES, tr("Resolve peer countries"), &m_checkBoxResolveCountries);
|
||||||
|
@ -303,6 +303,8 @@ void AppController::preferencesAction()
|
|||||||
data[u"save_resume_data_interval"_qs] = session->saveResumeDataInterval();
|
data[u"save_resume_data_interval"_qs] = session->saveResumeDataInterval();
|
||||||
// Recheck completed torrents
|
// Recheck completed torrents
|
||||||
data[u"recheck_completed_torrents"_qs] = pref->recheckTorrentsOnCompletion();
|
data[u"recheck_completed_torrents"_qs] = pref->recheckTorrentsOnCompletion();
|
||||||
|
// Refresh interval
|
||||||
|
data[u"refresh_interval"_qs] = session->refreshInterval();
|
||||||
// Resolve peer countries
|
// Resolve peer countries
|
||||||
data[u"resolve_peer_countries"_qs] = pref->resolvePeerCountries();
|
data[u"resolve_peer_countries"_qs] = pref->resolvePeerCountries();
|
||||||
// Reannounce to all trackers when ip/port changed
|
// Reannounce to all trackers when ip/port changed
|
||||||
@ -788,6 +790,9 @@ void AppController::setPreferencesAction()
|
|||||||
// Recheck completed torrents
|
// Recheck completed torrents
|
||||||
if (hasKey(u"recheck_completed_torrents"_qs))
|
if (hasKey(u"recheck_completed_torrents"_qs))
|
||||||
pref->recheckTorrentsOnCompletion(it.value().toBool());
|
pref->recheckTorrentsOnCompletion(it.value().toBool());
|
||||||
|
// Refresh interval
|
||||||
|
if (hasKey(u"refresh_interval"_qs))
|
||||||
|
session->setRefreshInterval(it.value().toInt());
|
||||||
// Resolve peer countries
|
// Resolve peer countries
|
||||||
if (hasKey(u"resolve_peer_countries"_qs))
|
if (hasKey(u"resolve_peer_countries"_qs))
|
||||||
pref->resolvePeerCountries(it.value().toBool());
|
pref->resolvePeerCountries(it.value().toBool());
|
||||||
|
@ -953,6 +953,14 @@
|
|||||||
<input type="checkbox" id="recheckTorrentsOnCompletion">
|
<input type="checkbox" id="recheckTorrentsOnCompletion">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label for="refreshInterval">QBT_TR(Refresh interval:)QBT_TR[CONTEXT=OptionsDialog]</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" id="refreshInterval" style="width: 15em;" title="QBT_TR(It controls the internal state update interval which in turn will affect UI updates)QBT_TR[CONTEXT=OptionsDialog]"> QBT_TR(ms)QBT_TR[CONTEXT=OptionsDialog]
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label for="resolvePeerCountries">QBT_TR(Resolve peer countries:)QBT_TR[CONTEXT=OptionsDialog]</label>
|
<label for="resolvePeerCountries">QBT_TR(Resolve peer countries:)QBT_TR[CONTEXT=OptionsDialog]</label>
|
||||||
@ -2007,6 +2015,7 @@
|
|||||||
updateInterfaceAddresses(pref.current_network_interface, pref.current_interface_address);
|
updateInterfaceAddresses(pref.current_network_interface, pref.current_interface_address);
|
||||||
$('saveResumeDataInterval').setProperty('value', pref.save_resume_data_interval);
|
$('saveResumeDataInterval').setProperty('value', pref.save_resume_data_interval);
|
||||||
$('recheckTorrentsOnCompletion').setProperty('checked', pref.recheck_completed_torrents);
|
$('recheckTorrentsOnCompletion').setProperty('checked', pref.recheck_completed_torrents);
|
||||||
|
$('refreshInterval').setProperty('value', pref.refresh_interval);
|
||||||
$('resolvePeerCountries').setProperty('checked', pref.resolve_peer_countries);
|
$('resolvePeerCountries').setProperty('checked', pref.resolve_peer_countries);
|
||||||
$('reannounceWhenAddressChanged').setProperty('checked', pref.reannounce_when_address_changed);
|
$('reannounceWhenAddressChanged').setProperty('checked', pref.reannounce_when_address_changed);
|
||||||
// libtorrent section
|
// libtorrent section
|
||||||
@ -2413,6 +2422,7 @@
|
|||||||
settings.set('current_interface_address', $('optionalIPAddressToBind').getProperty('value'));
|
settings.set('current_interface_address', $('optionalIPAddressToBind').getProperty('value'));
|
||||||
settings.set('save_resume_data_interval', $('saveResumeDataInterval').getProperty('value'));
|
settings.set('save_resume_data_interval', $('saveResumeDataInterval').getProperty('value'));
|
||||||
settings.set('recheck_completed_torrents', $('recheckTorrentsOnCompletion').getProperty('checked'));
|
settings.set('recheck_completed_torrents', $('recheckTorrentsOnCompletion').getProperty('checked'));
|
||||||
|
settings.set('refresh_interval', $('refreshInterval').getProperty('value'));
|
||||||
settings.set('resolve_peer_countries', $('resolvePeerCountries').getProperty('checked'));
|
settings.set('resolve_peer_countries', $('resolvePeerCountries').getProperty('checked'));
|
||||||
settings.set('reannounce_when_address_changed', $('reannounceWhenAddressChanged').getProperty('checked'));
|
settings.set('reannounce_when_address_changed', $('reannounceWhenAddressChanged').getProperty('checked'));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user