mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-04 14:42:29 -06:00
Expose 'max torrent file size' setting
This commit is contained in:
@@ -323,6 +323,8 @@ void AppController::preferencesAction()
|
||||
data[u"current_interface_address"_s] = BitTorrent::Session::instance()->networkInterfaceAddress();
|
||||
// Save resume data interval
|
||||
data[u"save_resume_data_interval"_s] = session->saveResumeDataInterval();
|
||||
// .torrent file size limit
|
||||
data[u"torrent_file_size_limit"_s] = pref->getTorrentFileSizeLimit();
|
||||
// Recheck completed torrents
|
||||
data[u"recheck_completed_torrents"_s] = pref->recheckTorrentsOnCompletion();
|
||||
// Refresh interval
|
||||
@@ -853,6 +855,9 @@ void AppController::setPreferencesAction()
|
||||
// Save resume data interval
|
||||
if (hasKey(u"save_resume_data_interval"_s))
|
||||
session->setSaveResumeDataInterval(it.value().toInt());
|
||||
// .torrent file size limit
|
||||
if (hasKey(u"torrent_file_size_limit"_s))
|
||||
pref->setTorrentFileSizeLimit(it.value().toLongLong());
|
||||
// Recheck completed torrents
|
||||
if (hasKey(u"recheck_completed_torrents"_s))
|
||||
pref->recheckTorrentsOnCompletion(it.value().toBool());
|
||||
|
||||
@@ -977,6 +977,14 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
<input type="text" id="saveResumeDataInterval" style="width: 15em;"> QBT_TR(min)QBT_TR[CONTEXT=OptionsDialog]
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="torrentFileSizeLimit">QBT_TR(.torrent file size limit:)QBT_TR[CONTEXT=OptionsDialog]</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="torrentFileSizeLimit" style="width: 15em;"> QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="recheckTorrentsOnCompletion">QBT_TR(Recheck torrents on completion:)QBT_TR[CONTEXT=OptionsDialog]</label>
|
||||
@@ -2147,6 +2155,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
updateNetworkInterfaces(pref.current_network_interface);
|
||||
updateInterfaceAddresses(pref.current_network_interface, pref.current_interface_address);
|
||||
$('saveResumeDataInterval').setProperty('value', pref.save_resume_data_interval);
|
||||
$('torrentFileSizeLimit').setProperty('value', (pref.torrent_file_size_limit / 1024 / 1024));
|
||||
$('recheckTorrentsOnCompletion').setProperty('checked', pref.recheck_completed_torrents);
|
||||
$('refreshInterval').setProperty('value', pref.refresh_interval);
|
||||
$('resolvePeerCountries').setProperty('checked', pref.resolve_peer_countries);
|
||||
@@ -2563,6 +2572,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
settings.set('current_network_interface', $('networkInterface').getProperty('value'));
|
||||
settings.set('current_interface_address', $('optionalIPAddressToBind').getProperty('value'));
|
||||
settings.set('save_resume_data_interval', $('saveResumeDataInterval').getProperty('value'));
|
||||
settings.set('torrent_file_size_limit', ($('torrentFileSizeLimit').getProperty('value') * 1024 * 1024));
|
||||
settings.set('recheck_completed_torrents', $('recheckTorrentsOnCompletion').getProperty('checked'));
|
||||
settings.set('refresh_interval', $('refreshInterval').getProperty('value'));
|
||||
settings.set('resolve_peer_countries', $('resolvePeerCountries').getProperty('checked'));
|
||||
|
||||
Reference in New Issue
Block a user