1 <div id=
"DownloadsTab" class=
"PrefTab">
2 <fieldset class=
"settings">
3 <legend>QBT_TR(When adding a torrent)QBT_TR[CONTEXT=OptionsDialog]
</legend>
5 <input type=
"checkbox" id=
"createsubfolder_checkbox" />
6 <label for=
"createsubfolder_checkbox">QBT_TR(Create subfolder for torrents with multiple files)QBT_TR[CONTEXT=OptionsDialog]
</label>
9 <input type=
"checkbox" id=
"dontstartdownloads_checkbox" />
10 <label for=
"dontstartauto_checkbox">QBT_TR(Do not start the download automatically)QBT_TR[CONTEXT=OptionsDialog]
</label>
13 <input type=
"checkbox" id=
"deletetorrentfileafter_checkbox" />
14 <label for=
"deletetorrentafter_checkbox">QBT_TR(Delete .torrent files afterwards)QBT_TR[CONTEXT=OptionsDialog]
</label>
19 <input type=
"checkbox" id=
"preallocateall_checkbox" />
20 <label for=
"preallocateall_checkbox">QBT_TR(Pre-allocate disk space for all files)QBT_TR[CONTEXT=OptionsDialog]
</label>
23 <span id=
"appendexttr">
24 <input type=
"checkbox" id=
"appendext_checkbox"/>
25 <label for=
"appendext_checkbox">QBT_TR(Append .!qB extension to incomplete files)QBT_TR[CONTEXT=OptionsDialog]
</label>
29 <fieldset class=
"settings">
30 <legend>QBT_TR(Saving Management)QBT_TR[CONTEXT=HttpServer]
</legend>
34 <label>QBT_TR(Default Torrent Management Mode:)QBT_TR[CONTEXT=OptionsDialog]
</label>
37 <select id=
"default_tmm_combobox">
38 <option value=
"false" selected
>QBT_TR(Manual)QBT_TR[CONTEXT=OptionsDialog]
</option>
39 <option value=
"true">QBT_TR(Automatic)QBT_TR[CONTEXT=OptionsDialog]
</option>
45 <label>QBT_TR(When Torrent Category changed:)QBT_TR[CONTEXT=OptionsDialog]
</label>
48 <select id=
"torrent_changed_tmm_combobox">
49 <option value=
"true">QBT_TR(Relocate torrent)QBT_TR[CONTEXT=OptionsDialog]
</option>
50 <option value=
"false" selected
>QBT_TR(Switch torrent to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]
</option>
56 <label>QBT_TR(When Default Save Path changed:)QBT_TR[CONTEXT=OptionsDialog]
</label>
59 <select id=
"save_path_changed_tmm_combobox">
60 <option value=
"true">QBT_TR(Relocate affected torrents)QBT_TR[CONTEXT=OptionsDialog]
</option>
61 <option value=
"false" selected
>QBT_TR(Switch affected torrents to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]
</option>
67 <label>QBT_TR(When Category Save Path changed:)QBT_TR[CONTEXT=OptionsDialog]
</label>
70 <select id=
"category_changed_tmm_combobox">
71 <option value=
"true">QBT_TR(Relocate affected torrents)QBT_TR[CONTEXT=OptionsDialog]
</option>
72 <option value=
"false" selected
>QBT_TR(Switch affected torrents to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]
</option>
80 <label for=
"savepath_text">QBT_TR(Default Save Path:)QBT_TR[CONTEXT=OptionsDialog]
</label>
83 <input type=
"text" id=
"savepath_text" autocorrect=
"off" autocapitalize=
"none" />
88 <input type=
"checkbox" id=
"temppath_checkbox" onclick=
"updateTempDirEnabled();" />
89 <label for=
"temppath_checkbox">QBT_TR(Keep incomplete torrents in:)QBT_TR[CONTEXT=OptionsDialog]
</label>
92 <input type=
"text" id=
"temppath_text" autocorrect=
"off" autocapitalize=
"none" />
97 <input type=
"checkbox" id=
"exportdir_checkbox" onclick=
"updateExportDirEnabled();" />
98 <label for=
"exportdir_checkbox">QBT_TR(Copy .torrent files to:)QBT_TR[CONTEXT=OptionsDialog]
</label>
101 <input type=
"text" id=
"exportdir_text" autocorrect=
"off" autocapitalize=
"none" />
106 <input type=
"checkbox" id=
"exportdirfin_checkbox" onclick=
"updateExportDirFinEnabled();" />
107 <label for=
"exportdirfin_checkbox">QBT_TR(Copy .torrent files for finished downloads to:)QBT_TR[CONTEXT=OptionsDialog]
</label>
110 <input type=
"text" id=
"exportdirfin_text" autocorrect=
"off" autocapitalize=
"none" />
116 <fieldset class=
"settings">
117 <legend>QBT_TR(Automatically add torrents from:)QBT_TR[CONTEXT=OptionsDialog]
</legend>
118 <table id=
"watched_folders_tab" style=
"border: 1px solid black;">
121 <th>QBT_TR(Monitored Folder)QBT_TR[CONTEXT=ScanFoldersModel]
</th>
122 <th>QBT_TR(Override Save Location)QBT_TR[CONTEXT=ScanFoldersModel]
</th>
128 <td style=
"padding-top:4px;"><input type=
"text" id=
"new_watch_folder_txt" autocorrect=
"off" autocapitalize=
"none" /></td>
129 <td style=
"padding-top:4px;">
130 <div class=
"select-watched-folder-editable">
131 <select id=
"new_watch_folder_select" onchange=
"changeWatchFolderSelect(this)">
132 <option selected
value=
"watch_folder">QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]
</option>
133 <option value=
"default_folder">QBT_TR(Default save location)QBT_TR[CONTEXT=ScanFoldersModel]
</option>
134 <option value=
"other">QBT_TR(Other...)QBT_TR[CONTEXT=HttpServer]
</option>
136 <input id=
"new_watch_folder_other_txt" type=
"text" value=
"QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]" hidden
/>
137 <img src=
"images/qbt-theme/list-add.svg" alt=
"Add" style=
"padding-left:170px;width:16px;cursor:pointer;" onclick=
"addWatchFolder();" />
145 <fieldset class=
"settings">
147 <input type=
"checkbox" id=
"mail_notification_checkbox" onclick=
"updateMailNotification();" />
148 <label for=
"mail_notification_checkbox">QBT_TR(Email notification upon download completion)QBT_TR[CONTEXT=OptionsDialog]
</label>
153 <label for=
"src_email_txt">QBT_TR(From:)QBT_TR[CONTEXT=OptionsDialog]
</label>
156 <input type=
"text" id=
"src_email_txt" />
161 <label for=
"dest_email_txt">QBT_TR(To:)QBT_TR[CONTEXT=OptionsDialog]
</label>
164 <input type=
"text" id=
"dest_email_txt" />
169 <label for=
"smtp_server_txt">QBT_TR(SMTP server:)QBT_TR[CONTEXT=OptionsDialog]
</label>
172 <input type=
"text" id=
"smtp_server_txt" />
176 <div class=
"formRow">
177 <input type=
"checkbox" id=
"mail_ssl_checkbox" /><label for=
"mail_ssl_checkbox">QBT_TR(This server requires a secure connection (SSL))QBT_TR[CONTEXT=OptionsDialog]
</label>
179 <fieldset class=
"settings">
181 <input type=
"checkbox" id=
"mail_auth_checkbox" onclick=
"updateMailAuthSettings();" />
182 <label for=
"mail_auth_checkbox">QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]
</label>
187 <label for=
"mail_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]
</label>
190 <input type=
"text" id=
"mail_username_text" />
195 <label for=
"mail_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]
</label>
198 <input type=
"password" id=
"mail_password_text" />
205 <fieldset class=
"settings">
207 <input type=
"checkbox" id=
"autorun_checkbox" onclick=
"updateAutoRun();" />
208 <label for=
"autorun_checkbox">QBT_TR(Run external program on torrent completion)QBT_TR[CONTEXT=OptionsDialog]
</label>
210 <div class=
"formRow">
211 <input type=
"text" id=
"autorunProg_txt" style=
"width: 400px;" />
213 <div style=
"font-style: italic;">QBT_TR(Supported parameters (case sensitive):)QBT_TR[CONTEXT=OptionsDialog]
215 <li>QBT_TR(%N: Torrent name)QBT_TR[CONTEXT=OptionsDialog]
</li>
216 <li>QBT_TR(%L: Category)QBT_TR[CONTEXT=OptionsDialog]
</li>
217 <li>QBT_TR(%G: Tags (separated by comma))QBT_TR[CONTEXT=OptionsDialog]
</li>
218 <li>QBT_TR(%F: Content path (same as root path for multifile torrent))QBT_TR[CONTEXT=OptionsDialog]
</li>
219 <li>QBT_TR(%R: Root path (first torrent subdirectory path))QBT_TR[CONTEXT=OptionsDialog]
</li>
220 <li>QBT_TR(%D: Save path)QBT_TR[CONTEXT=OptionsDialog]
</li>
221 <li>QBT_TR(%C: Number of files)QBT_TR[CONTEXT=OptionsDialog]
</li>
222 <li>QBT_TR(%Z: Torrent size (bytes))QBT_TR[CONTEXT=OptionsDialog]
</li>
223 <li>QBT_TR(%T: Current tracker)QBT_TR[CONTEXT=OptionsDialog]
</li>
224 <li>QBT_TR(%I: Info hash)QBT_TR[CONTEXT=OptionsDialog]
</li>
226 QBT_TR(Tip: Encapsulate parameter with quotation marks to avoid text being cut off at whitespace (e.g.,
"%N"))QBT_TR[CONTEXT=OptionsDialog]
231 <div id=
"ConnectionTab" class=
"PrefTab invisible">
232 <div class=
"formRow">
233 <label>QBT_TR(Enabled protocol:)QBT_TR[CONTEXT=OptionsDialog]
</label>
234 <select id=
"enable_protocol_combobox">
235 <option value=
"0" selected
>QBT_TR(TCP and μTP)QBT_TR[CONTEXT=OptionsDialog]
</option>
236 <option value=
"1">TCP
</option>
237 <option value=
"2">μTP
</option>
240 <fieldset class=
"settings">
241 <legend>QBT_TR(Listening Port)QBT_TR[CONTEXT=OptionsDialog]
</legend>
242 <div class=
"formRow">
243 <label for=
"port_value">QBT_TR(Port used for incoming connections:)QBT_TR[CONTEXT=OptionsDialog]
</label>
244 <input type=
"text" id=
"port_value" style=
"width: 4em;" />
245 <button style=
"margin-left: 1em;" onclick=
"generateRandomPort();">Random
</button>
247 <div class=
"formRow">
248 <input type=
"checkbox" id=
"upnp_checkbox" />
249 <label for=
"upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP port forwarding from my router)QBT_TR[CONTEXT=OptionsDialog]
</label>
251 <div class=
"formRow">
252 <input type=
"checkbox" id=
"random_port_checkbox" />
253 <label for=
"random_port_checkbox">QBT_TR(Use different port on each startup)QBT_TR[CONTEXT=OptionsDialog]
</label>
257 <fieldset class=
"settings">
258 <legend>QBT_TR(Connections Limits)QBT_TR[CONTEXT=OptionsDialog]
</legend>
262 <input type=
"checkbox" id=
"max_connec_checkbox" onclick=
"updateMaxConnecEnabled();" />
263 <label for=
"max_connec_checkbox">QBT_TR(Global maximum number of connections:)QBT_TR[CONTEXT=OptionsDialog]
</label>
265 <td><input type=
"text" id=
"max_connec_value" style=
"width: 4em;" /></td>
269 <input type=
"checkbox" id=
"max_connec_per_torrent_checkbox" onclick=
"updateMaxConnecPerTorrentEnabled();" />
270 <label for=
"max_connec_per_torrent_checkbox">QBT_TR(Maximum number of connections per torrent:)QBT_TR[CONTEXT=OptionsDialog]
</label>
272 <td><input type=
"text" id=
"max_connec_per_torrent_value" style=
"width: 4em;" /></td>
276 <input type=
"checkbox" id=
"max_uploads_checkbox" onclick=
"updateMaxUploadsEnabled();" />
277 <label for=
"max_uploads_checkbox">QBT_TR(Global maximum number of upload slots:)QBT_TR[CONTEXT=OptionsDialog]
</label>
279 <td><input type=
"text" id=
"max_uploads_value" style=
"width: 4em;" /></td>
283 <input type=
"checkbox" id=
"max_uploads_per_torrent_checkbox" onclick=
"updateMaxUploadsPerTorrentEnabled();" />
284 <label for=
"max_uploads_per_torrent_checkbox">QBT_TR(Maximum number of upload slots per torrent:)QBT_TR[CONTEXT=OptionsDialog]
</label>
286 <td><input type=
"text" id=
"max_uploads_per_torrent_value" style=
"width: 4em;" /></td>
291 <fieldset class=
"settings">
292 <legend>QBT_TR(Proxy Server)QBT_TR[CONTEXT=OptionsDialog]
</legend>
296 <label for=
"peer_proxy_type_select">QBT_TR(Type:)QBT_TR[CONTEXT=OptionsDialog]
</label>
299 <select id=
"peer_proxy_type_select" onchange=
"updatePeerProxySettings();">
300 <option value=
"none">QBT_TR((None))QBT_TR[CONTEXT=OptionsDialog]
</option>
301 <option value=
"socks4">QBT_TR(SOCKS4)QBT_TR[CONTEXT=OptionsDialog]
</option>
302 <option value=
"socks5">QBT_TR(SOCKS5)QBT_TR[CONTEXT=OptionsDialog]
</option>
303 <option value=
"http">QBT_TR(HTTP)QBT_TR[CONTEXT=OptionsDialog]
</option>
307 <label for=
"peer_proxy_host_text">QBT_TR(Host:)QBT_TR[CONTEXT=OptionsDialog]
</label>
310 <input type=
"text" id=
"peer_proxy_host_text" />
313 <label for=
"peer_proxy_port_value">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]
</label>
316 <input type=
"text" id=
"peer_proxy_port_value" style=
"width: 4em;" />
320 <div class=
"formRow">
321 <input type=
"checkbox" id=
"use_peer_proxy_checkbox" />
322 <label for=
"use_peer_proxy_checkbox">QBT_TR(Use proxy for peer connections)QBT_TR[CONTEXT=OptionsDialog]
</label>
324 <div class=
"formRow">
325 <input type=
"checkbox" id=
"proxy_only_for_torrents_checkbox" />
326 <label for=
"proxy_only_for_torrents_checkbox">QBT_TR(Use proxy only for torrents)QBT_TR[CONTEXT=OptionsDialog]
</label>
328 <fieldset class=
"settings">
330 <input type=
"checkbox" id=
"peer_proxy_auth_checkbox" onclick=
"updatePeerProxyAuthSettings();" />
331 <label for=
"peer_proxy_auth_checkbox">QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]
</label>
336 <label for=
"peer_proxy_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]
</label>
339 <input type=
"text" id=
"peer_proxy_username_text" />
344 <label for=
"peer_proxy_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]
</label>
347 <input type=
"password" id=
"peer_proxy_password_text" />
351 <div class=
"formRow">
352 <span>Info: The password is saved unencrypted
</span>
357 <fieldset class=
"settings">
359 <input type=
"checkbox" id=
"ipfilter_enabled_checkbox" onclick=
"updateFilterSettings();" />
360 <label for=
"ipfilter_enabled_checkbox">QBT_TR(IP Filtering)QBT_TR[CONTEXT=OptionsDialog]
</label>
362 <div class=
"formRow">
363 <label for=
"ipfilter_text">QBT_TR(Filter path (.dat, .p2p, .p2b):)QBT_TR[CONTEXT=OptionsDialog]
</label>
364 <input type=
"text" id=
"ipfilter_text" />
366 <div class=
"formRow">
367 <input type=
"checkbox" id=
"ipfilter_trackers_checkbox" />
368 <label for=
"ipfilter_trackers_checkbox">QBT_TR(Apply to trackers)QBT_TR[CONTEXT=OptionsDialog]
</label>
370 <div class=
"formRow">
371 <fieldset class=
"settings">
372 <legend>QBT_TR(Manually banned IP addresses...)QBT_TR[CONTEXT=OptionsDialog]
</legend>
373 <textarea id=
"banned_IPs_textarea" rows=
"5" cols=
"70"></textarea>
379 <div id=
"SpeedTab" class=
"PrefTab invisible">
380 <fieldset class=
"settings">
381 <legend>QBT_TR(Global Rate Limits)QBT_TR[CONTEXT=OptionsDialog]
</legend>
385 <img src=
"images/slow_off.svg" style=
"height: 1em;" alt=
"QBT_TR(Alternative speed limits)QBT_TR[CONTEXT=MainWindow]">
387 <td><label for=
"up_limit_value">QBT_TR(Upload:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
388 <td><input type=
"number" id=
"up_limit_value" style=
"width: 4em;" min=
"0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
</td>
391 <td><label for=
"dl_limit_value">QBT_TR(Download:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
392 <td><input type=
"number" id=
"dl_limit_value" style=
"width: 4em;" min=
"0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
</td>
395 <i>QBT_TR(
0 means unlimited)QBT_TR[CONTEXT=OptionsDialog]
</i>
398 <fieldset class=
"settings">
399 <legend>QBT_TR(Alternative Rate Limits)QBT_TR[CONTEXT=OptionsDialog]
</legend>
403 <img src=
"images/slow.svg" style=
"height: 1em;" alt=
"QBT_TR(Alternative speed limits)QBT_TR[CONTEXT=MainWindow]">
405 <td><label for=
"alt_up_limit_value">QBT_TR(Upload:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
406 <td><input type=
"number" id=
"alt_up_limit_value" style=
"width: 4em;" min=
"0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
</td>
409 <td><label for=
"alt_dl_limit_value">QBT_TR(Download:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
410 <td><input type=
"number" id=
"alt_dl_limit_value" style=
"width: 4em;" min=
"0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
</td>
413 <i>QBT_TR(
0 means unlimited)QBT_TR[CONTEXT=OptionsDialog]
</i>
415 <fieldset class=
"settings">
417 <input type=
"checkbox" id=
"limit_sheduling_checkbox" onclick=
"updateSchedulingEnabled();" />
418 <label for=
"limit_sheduling_checkbox">QBT_TR(Schedule the use of alternative rate limits)QBT_TR[CONTEXT=OptionsDialog]
</label>
420 <div class=
"formRow">
421 QBT_TR(From:)QBT_TR[CONTEXT=OptionsDialog]
422 <input type=
"text" id=
"schedule_from_hour" style=
"width: 1.5em;" />:
<input type=
"text" id=
"schedule_from_min" style=
"width: 1.5em;" /> QBT_TR(To:)QBT_TR[CONTEXT=OptionsDialog]
423 <input type=
"text" id=
"schedule_to_hour" style=
"width: 1.5em;" />:
<input type=
"text" id=
"schedule_to_min" style=
"width: 1.5em;" />
425 <div class=
"formRow">
426 QBT_TR(When:)QBT_TR[CONTEXT=OptionsDialog]
427 <select id=
"schedule_freq_select">
428 <option value=
"0">QBT_TR(Every day)QBT_TR[CONTEXT=OptionsDialog]
</option>
429 <option value=
"1">QBT_TR(Weekdays)QBT_TR[CONTEXT=OptionsDialog]
</option>
430 <option value=
"2">QBT_TR(Weekends)QBT_TR[CONTEXT=OptionsDialog]
</option>
431 <option value=
"3">QBT_TR(Monday)QBT_TR[CONTEXT=HttpServer]
</option>
432 <option value=
"4">QBT_TR(Tuesday)QBT_TR[CONTEXT=HttpServer]
</option>
433 <option value=
"5">QBT_TR(Wednesday)QBT_TR[CONTEXT=HttpServer]
</option>
434 <option value=
"6">QBT_TR(Thursday)QBT_TR[CONTEXT=HttpServer]
</option>
435 <option value=
"7">QBT_TR(Friday)QBT_TR[CONTEXT=HttpServer]
</option>
436 <option value=
"8">QBT_TR(Saturday)QBT_TR[CONTEXT=HttpServer]
</option>
437 <option value=
"9">QBT_TR(Sunday)QBT_TR[CONTEXT=HttpServer]
</option>
443 <fieldset class=
"settings">
444 <legend>QBT_TR(Rate Limits Settings)QBT_TR[CONTEXT=OptionsDialog]
</legend>
445 <div class=
"formRow">
446 <input type=
"checkbox" id=
"limit_utp_rate_checkbox" />
447 <label for=
"limit_utp_rate_checkbox">QBT_TR(Apply rate limit to µTP protocol)QBT_TR[CONTEXT=OptionsDialog]
</label>
449 <div class=
"formRow">
450 <input type=
"checkbox" id=
"limit_tcp_overhead_checkbox" />
451 <label for=
"limit_tcp_overhead_checkbox">QBT_TR(Apply rate limit to transport overhead)QBT_TR[CONTEXT=OptionsDialog]
</label>
453 <div class=
"formRow">
454 <input type=
"checkbox" id=
"limit_lan_peers_checkbox" />
455 <label for=
"limit_lan_peers_checkbox">QBT_TR(Apply rate limit to peers on LAN)QBT_TR[CONTEXT=OptionsDialog]
</label>
460 <div id=
"BittorrentTab" class=
"PrefTab invisible">
461 <fieldset class=
"settings">
462 <legend>QBT_TR(Privacy)QBT_TR[CONTEXT=OptionsDialog]
</legend>
463 <div class=
"formRow">
464 <input type=
"checkbox" id=
"dht_checkbox" />
465 <label for=
"dht_checkbox">QBT_TR(Enable DHT (decentralized network) to find more peers)QBT_TR[CONTEXT=OptionsDialog]
</label>
467 <div class=
"formRow">
468 <input type=
"checkbox" id=
"pex_checkbox" />
469 <label for=
"pex_checkbox">QBT_TR(Enable Peer Exchange (PeX) to find more peers)QBT_TR[CONTEXT=OptionsDialog]
</label>
471 <div class=
"formRow">
472 <input type=
"checkbox" id=
"lsd_checkbox" />
473 <label for=
"lsd_checkbox">QBT_TR(Enable Local Peer Discovery to find more peers)QBT_TR[CONTEXT=OptionsDialog]
</label>
475 <div class=
"formRow">
476 <label for=
"encryption_select">QBT_TR(Encryption mode:)QBT_TR[CONTEXT=OptionsDialog]
</label>
477 <select id=
"encryption_select">
478 <option value=
"0">QBT_TR(Allow encryption)QBT_TR[CONTEXT=OptionsDialog]
</option>
479 <option value=
"1">QBT_TR(Require encryption)QBT_TR[CONTEXT=OptionsDialog]
</option>
480 <option value=
"2">QBT_TR(Disable encryption)QBT_TR[CONTEXT=OptionsDialog]
</option>
483 <div class=
"formRow">
484 <input type=
"checkbox" id=
"anonymous_mode_checkbox" />
485 <label for=
"anonymous_mode_checkbox">QBT_TR(Enable anonymous mode)QBT_TR[CONTEXT=OptionsDialog] (
<a target=
"_blank" href=
"https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode">QBT_TR(More information)QBT_TR[CONTEXT=HttpServer]
</a>)
</label>
489 <fieldset class=
"settings">
491 <input type=
"checkbox" id=
"queueing_checkbox" onclick=
"updateQueueingSystem();" />
492 <label for=
"queueing_checkbox">QBT_TR(Torrent Queueing)QBT_TR[CONTEXT=OptionsDialog]
</label>
497 <label for=
"max_active_dl_value">QBT_TR(Maximum active downloads:)QBT_TR[CONTEXT=OptionsDialog]
</label>
500 <input type=
"text" id=
"max_active_dl_value" style=
"width: 4em;" />
505 <label for=
"max_active_up_value">QBT_TR(Maximum active uploads:)QBT_TR[CONTEXT=OptionsDialog]
</label>
508 <input type=
"text" id=
"max_active_up_value" style=
"width: 4em;" />
513 <label for=
"max_active_to_value">QBT_TR(Maximum active torrents:)QBT_TR[CONTEXT=OptionsDialog]
</label>
516 <input type=
"text" id=
"max_active_to_value" style=
"width: 4em;" />
520 <fieldset class=
"settings">
522 <input type=
"checkbox" id=
"dont_count_slow_torrents_checkbox" onclick=
"updateSlowTorrentsSettings();" />
523 <label for=
"dont_count_slow_torrents_checkbox">QBT_TR(Do not count slow torrents in these limits)QBT_TR[CONTEXT=OptionsDialog]
</label>
528 <label for=
"dl_rate_threshold">QBT_TR(Download rate threshold:)QBT_TR[CONTEXT=OptionsDialog]
</label>
531 <input type=
"text" id=
"dl_rate_threshold" style=
"width: 4em;" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
536 <label for=
"ul_rate_threshold">QBT_TR(Upload rate threshold:)QBT_TR[CONTEXT=OptionsDialog]
</label>
539 <input type=
"text" id=
"ul_rate_threshold" style=
"width: 4em;" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
544 <label for=
"torrent_inactive_timer">QBT_TR(Torrent inactivity timer:)QBT_TR[CONTEXT=OptionsDialog]
</label>
547 <input type=
"text" id=
"torrent_inactive_timer" style=
"width: 4em;" /> QBT_TR(seconds)QBT_TR[CONTEXT=OptionsDialog]
554 <fieldset class=
"settings">
555 <legend>QBT_TR(Share Ratio Limiting)QBT_TR[CONTEXT=OptionsDialog]
</legend>
559 <input type=
"checkbox" id=
"max_ratio_checkbox" onclick=
"updateMaxRatioTimeEnabled();" />
560 <label for=
"max_ratio_checkbox">QBT_TR(Seed torrents until their ratio reaches)QBT_TR[CONTEXT=OptionsDialog]
</label>
563 <input type=
"text" id=
"max_ratio_value" style=
"width: 4em;" />
567 <input type=
"checkbox" id=
"max_seeding_time_checkbox" onclick=
"updateMaxRatioTimeEnabled();" />
568 <label for=
"max_seeding_time_checkbox">QBT_TR(Seed torrents until their seeding time reaches)QBT_TR[CONTEXT=OptionsDialog]
</label>
571 <input type=
"text" id=
"max_seeding_time_value" style=
"width: 4em;" /> QBT_TR(minutes)QBT_TR[CONTEXT=OptionsDialog]
575 <td style=
"text-align: right;">
576 QBT_TR(then)QBT_TR[CONTEXT=OptionsDialog]
579 <select id=
"max_ratio_act">
580 <option value=
"0">QBT_TR(Pause them)QBT_TR[CONTEXT=OptionsDialog]
</option>
581 <option value=
"1">QBT_TR(Remove them)QBT_TR[CONTEXT=OptionsDialog]
</option>
582 <option value=
"2">QBT_TR(Enable super seeding for them)QBT_TR[CONTEXT=OptionsDialog]
</option>
589 <fieldset class=
"settings">
591 <input type=
"checkbox" id=
"add_trackers_checkbox" onclick=
"updateAddTrackersEnabled();" />
592 <label for=
"add_trackers_checkbox">QBT_TR(Automatically add these trackers to new downloads:)QBT_TR[CONTEXT=OptionsDialog]
</label>
594 <textarea id=
"add_trackers_textarea" rows=
"5" cols=
"70"></textarea>
598 <div id=
"WebUITab" class=
"PrefTab invisible">
599 <fieldset class=
"settings">
600 <legend>QBT_TR(Language)QBT_TR[CONTEXT=OptionsDialog]
</legend>
601 <label for=
"locale_select">QBT_TR(User Interface Language:)QBT_TR[CONTEXT=OptionsDialog]
</label>
602 <select id=
"locale_select">
603 <option value=
"en">English
</option>
604 <option value=
"en_AU">English(Australia)
</option>
605 <option value=
"en_GB">English(United Kingdom)
</option>
606 <option value=
"eo_EO">Esperanto
</option>
607 <option value=
"fr_FR">Français
</option>
608 <option value=
"de_DE">Deutsch
</option>
609 <option value=
"hu_HU">Magyar
</option>
610 <option value=
"is">Íslenska
</option>
611 <option value=
"id">Bahasa Indonesia
</option>
612 <option value=
"it_IT">Italiano
</option>
613 <option value=
"nl_NL">Nederlands
</option>
614 <option value=
"es_ES">Español
</option>
615 <option value=
"ca_ES">Català
</option>
616 <option value=
"gl_ES">Galego
</option>
617 <option value=
"oc">lenga d'òc
</option>
618 <option value=
"pt_BR">Português brasileiro
</option>
619 <option value=
"pt_PT">Português
</option>
620 <option value=
"pl_PL">Polski
</option>
621 <option value=
"lv_LV">latviešu valoda
</option>
622 <option value=
"lt_LT">Lietuvių
</option>
623 <option value=
"ms_MY">بهاس ملايو
</option>
624 <option value=
"cs_CZ">Čeština
</option>
625 <option value=
"sk_SK">Slovenčina
</option>
626 <option value=
"sl_SI">Slovenščina
</option>
627 <option value=
"sr_CS">Српски
</option>
628 <option value=
"hi_IN">हिन्दी, हिंदी
</option>
629 <option value=
"hr_HR">Hrvatski
</option>
630 <option value=
"hy_AM">Հայերեն
</option>
631 <option value=
"ro_RO">Română
</option>
632 <option value=
"tr_TR">Türkçe
</option>
633 <option value=
"el_GR">Ελληνικά
</option>
634 <option value=
"sv_SE">Svenska
</option>
635 <option value=
"fi_FI">Suomi
</option>
636 <option value=
"nb_NO">Norsk
</option>
637 <option value=
"da_DK">Dansk
</option>
638 <option value=
"bg_BG">Български
</option>
639 <option value=
"uk_UA">Українська
</option>
640 <option value=
"uz@Latn">أۇزبېك
</option>
641 <option value=
"ru_RU">Русский
</option>
642 <option value=
"ja_JP">日本語
</option>
643 <option value=
"he_IL">עברית
</option>
644 <option value=
"ar_AE">عربي
</option>
645 <option value=
"ka_GE">ქართული
</option>
646 <option value=
"be_BY">Беларуская
</option>
647 <option value=
"eu_ES">Euskara
</option>
648 <option value=
"vi_VN">tiếng Việt
</option>
649 <option value=
"zh">简体中文
</option>
650 <option value=
"zh_TW">正體中文
</option>
651 <option value=
"zh_HK">香港正體字
</option>
652 <option value=
"ko_KR">한글
</option>
656 <fieldset class=
"settings">
657 <legend>QBT_TR(Web User Interface (Remote control))QBT_TR[CONTEXT=OptionsDialog]
</legend>
661 <label for=
"webui_address_value">QBT_TR(IP address:)QBT_TR[CONTEXT=OptionsDialog]
</label>
664 <input type=
"text" id=
"webui_address_value" />
665 <label for=
"webui_port_value" style=
"margin-left: 10px;">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]
</label>
666 <input type=
"text" id=
"webui_port_value" style=
"width: 4em;" />
670 <div class=
"formRow">
671 <input type=
"checkbox" id=
"webui_upnp_checkbox" />
672 <label for=
"webui_upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP to forward the port from my router)QBT_TR[CONTEXT=OptionsDialog]
</label>
674 <fieldset class=
"settings">
676 <input type=
"checkbox" id=
"use_https_checkbox" onclick=
"updateHttpsSettings();" />
677 <label for=
"use_https_checkbox">QBT_TR(Use HTTPS instead of HTTP)QBT_TR[CONTEXT=OptionsDialog]
</label>
682 <label for=
"ssl_cert_text">QBT_TR(Certificate:)QBT_TR[CONTEXT=OptionsDialog]
</label>
685 <input type=
"text" id=
"ssl_cert_text" style=
"width: 30em;" />
690 <label for=
"ssl_key_text">QBT_TR(Key:)QBT_TR[CONTEXT=OptionsDialog]
</label>
693 <input type=
"text" id=
"ssl_key_text" style=
"width: 30em;" />
697 <div style=
"padding-left: 10px;"><a target=
"_blank" href=
"https://httpd.apache.org/docs/current/ssl/ssl_faq.html#aboutcerts">QBT_TR(Information about certificates)QBT_TR[CONTEXT=HttpServer]
</a></div>
700 <fieldset class=
"settings">
701 <legend>QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]
</legend>
705 <label for=
"webui_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]
</label>
708 <input type=
"text" id=
"webui_username_text" />
713 <label for=
"webui_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]
</label>
716 <input type=
"password" id=
"webui_password_text" placeholder=
"QBT_TR(Change current password)QBT_TR[CONTEXT=OptionsDialog]" autocomplete=
"new-password" />
720 <div class=
"formRow">
721 <input type=
"checkbox" id=
"bypass_local_auth_checkbox" />
722 <label for=
"bypass_local_auth_checkbox">QBT_TR(Bypass authentication for clients on localhost)QBT_TR[CONTEXT=OptionsDialog]
</label>
724 <div class=
"formRow">
725 <input type=
"checkbox" id=
"bypass_auth_subnet_whitelist_checkbox" onclick=
"updateBypasssAuthSettings();" />
726 <label for=
"bypass_auth_subnet_whitelist_checkbox">QBT_TR(Bypass authentication for clients in whitelisted IP subnets)QBT_TR[CONTEXT=OptionsDialog]
</label>
728 <div class=
"formRow" style=
"padding-left: 30px; padding-top: 5px;">
729 <textarea id=
"bypass_auth_subnet_whitelist_textarea" rows=
"5" cols=
"48" placeholder=
"Example: 172.17.32.0/24, fdff:ffff:c8::/40"></textarea>
733 <td><label for=
"webUISessionTimeoutInput">QBT_TR(Session timeout:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
734 <td><input type=
"number" id=
"webUISessionTimeoutInput" style=
"width: 4em;" min=
"0" /> QBT_TR(sec)QBT_TR[CONTEXT=OptionsDialog]
</td>
739 <fieldset class=
"settings">
740 <legend><input type=
"checkbox" id=
"use_alt_webui_checkbox" onclick=
"updateAlternativeWebUISettings();" />
741 <label for=
"use_alt_webui_checkbox">QBT_TR(Use alternative Web UI)QBT_TR[CONTEXT=OptionsDialog]
</label></legend>
742 <div class=
"formRow">
743 <label for=
"webui_files_location_textarea">QBT_TR(Files location:)QBT_TR[CONTEXT=OptionsDialog]
</label>
744 <input type=
"text" id=
"webui_files_location_textarea" />
748 <fieldset class=
"settings">
749 <legend>QBT_TR(Security)QBT_TR[CONTEXT=OptionsDialog]
</legend>
750 <div class=
"formRow">
751 <input type=
"checkbox" id=
"clickjacking_protection_checkbox" />
752 <label for=
"clickjacking_protection_checkbox">QBT_TR(Enable clickjacking protection)QBT_TR[CONTEXT=OptionsDialog]
</label>
754 <div class=
"formRow">
755 <input type=
"checkbox" id=
"csrf_protection_checkbox" />
756 <label for=
"csrf_protection_checkbox">QBT_TR(Enable Cross-Site Request Forgery (CSRF) protection)QBT_TR[CONTEXT=OptionsDialog]
</label>
759 <fieldset class=
"settings">
761 <input type=
"checkbox" id=
"host_header_validation_checkbox" onclick=
"updateHostHeaderValidationSettings();" />
762 <label for=
"host_header_validation_checkbox">QBT_TR(Enable Host header validation)QBT_TR[CONTEXT=OptionsDialog]
</label>
767 <label for=
"webui_domain_textarea">QBT_TR(Server domains:)QBT_TR[CONTEXT=OptionsDialog]
</label>
770 <textarea id=
"webui_domain_textarea" rows=
"1" cols=
"60"></textarea>
778 <fieldset class=
"settings">
780 <input type=
"checkbox" id=
"use_dyndns_checkbox" onclick=
"updateDynDnsSettings();" />
781 <label for=
"use_dyndns_checkbox">QBT_TR(Update my dynamic domain name)QBT_TR[CONTEXT=OptionsDialog]
</label>
783 <select id=
"dyndns_select">
784 <option value=
"0">DynDNS
</option>
785 <option value=
"1">NO-IP
</option>
787 <input type=
"button" value=
"QBT_TR(Register)QBT_TR[CONTEXT=OptionsDialog]" onclick=
"registerDynDns();" />
788 <table style=
"margin-top: 10px;">
791 <label for=
"dyndns_domain_text">QBT_TR(Domain name:)QBT_TR[CONTEXT=OptionsDialog]
</label>
794 <input type=
"text" id=
"dyndns_domain_text" />
799 <label for=
"dyndns_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]
</label>
802 <input type=
"text" id=
"dyndns_username_text" />
807 <label for=
"dyndns_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]
</label>
810 <input type=
"password" id=
"dyndns_password_text" />
817 <div id=
"AdvancedTab" class=
"PrefTab invisible">
818 <fieldset class=
"settings">
819 <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>
823 <label for=
"networkInterface">QBT_TR(Network Interface (requires restart):)QBT_TR[CONTEXT=OptionsDialog]
</label>
826 <select id=
"networkInterface" style=
"width: 15em;">
832 <label for=
"optionalIPAddressToBind">QBT_TR(Optional IP Address to bind to (requires restart):)QBT_TR[CONTEXT=OptionsDialog]
</label>
835 <select id=
"optionalIPAddressToBind" style=
"width: 15em;">
841 <label for=
"listenOnIPv6Address">QBT_TR(Listen on IPv6 address (requires restart):)QBT_TR[CONTEXT=OptionsDialog]
</label>
844 <input type=
"checkbox" id=
"listenOnIPv6Address">
849 <label for=
"saveResumeDataInterval">QBT_TR(Save resume data interval:)QBT_TR[CONTEXT=OptionsDialog]
</label>
852 <input type=
"text" id=
"saveResumeDataInterval" style=
"width: 15em;"> QBT_TR(min)QBT_TR[CONTEXT=OptionsDialog]
857 <label for=
"recheckTorrentsOnCompletion">QBT_TR(Recheck torrents on completion:)QBT_TR[CONTEXT=OptionsDialog]
</label>
860 <input type=
"checkbox" id=
"recheckTorrentsOnCompletion">
865 <label for=
"resolvePeerCountries">QBT_TR(Resolve peer countries (GeoIP):)QBT_TR[CONTEXT=OptionsDialog]
</label>
868 <input type=
"checkbox" id=
"resolvePeerCountries">
873 <fieldset class=
"settings">
874 <legend>QBT_TR(libtorrent Section)QBT_TR[CONTEXT=OptionsDialog]
(
<a href=
"https://www.libtorrent.org/reference.html" target=
"_blank">QBT_TR(Open documentation)QBT_TR[CONTEXT=HttpServer]
</a>)
</legend>
878 <label for=
"asyncIOThreads">QBT_TR(Asynchronous I/O threads:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#aio_threads" target=
"_blank">(?)
</a></label>
881 <input type=
"text" id=
"asyncIOThreads" style=
"width: 15em;" />
886 <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>
889 <input type=
"text" id=
"filePoolSize" style=
"width: 15em;" />
894 <label for=
"outstandMemoryWhenCheckingTorrents">QBT_TR(Outstanding memory when checking torrents:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#checking_mem_usage" target=
"_blank">(?)
</a></label>
897 <input type=
"text" id=
"outstandMemoryWhenCheckingTorrents" style=
"width: 15em;" /> QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
902 <label for=
"diskCache">QBT_TR(Disk cache:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#cache_size" target=
"_blank">(?)
</a></label>
905 <input type=
"text" id=
"diskCache" style=
"width: 15em;" /> QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
910 <label for=
"diskCacheExpiryInterval">QBT_TR(Disk cache expiry interval:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#cache_expiry" target=
"_blank">(?)
</a></label>
913 <input type=
"text" id=
"diskCacheExpiryInterval" style=
"width: 15em;"> QBT_TR(s)QBT_TR[CONTEXT=OptionsDialog]
918 <label for=
"enableOSCache">QBT_TR(Enable OS cache:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode" target=
"_blank">(?)
</a></label>
921 <input type=
"checkbox" id=
"enableOSCache" />
926 <label for=
"coalesceReadsAndWrites">QBT_TR(Coalesce reads & writes:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#coalesce_reads" target=
"_blank">(?)
</a></label>
929 <input type=
"checkbox" id=
"coalesceReadsAndWrites" />
934 <label for=
"sendUploadPieceSuggestions">QBT_TR(Send upload piece suggestions:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#suggest_mode" target=
"_blank">(?)
</a></label>
937 <input type=
"checkbox" id=
"sendUploadPieceSuggestions" />
942 <label for=
"sendBufferWatermark">QBT_TR(Send buffer watermark:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark" target=
"_blank">(?)
</a></label>
945 <input type=
"text" id=
"sendBufferWatermark" style=
"width: 15em;" /> QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
950 <label for=
"sendBufferLowWatermark">QBT_TR(Send buffer low watermark:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#send_buffer_low_watermark" target=
"_blank">(?)
</a></label>
953 <input type=
"text" id=
"sendBufferLowWatermark" style=
"width: 15em;" /> QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
958 <label for=
"sendBufferWatermarkFactor">QBT_TR(Send buffer watermark factor:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark_factor" target=
"_blank">(?)
</a></label>
961 <input type=
"text" id=
"sendBufferWatermarkFactor" style=
"width: 15em;" /> %
966 <label for=
"socketBacklogSize">QBT_TR(Socket backlog size:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#listen_queue_size" target=
"_blank">(?)
</a></label>
969 <input type=
"text" id=
"socketBacklogSize" style=
"width: 15em;" />
974 <label for=
"outgoingPortsMin">QBT_TR(Outgoing ports (Min) [
0: Disabled]:)QBT_TR[CONTEXT=OptionsDialog]
</label>
977 <input type=
"text" id=
"outgoingPortsMin" style=
"width: 15em;" />
982 <label for=
"outgoingPortsMax">QBT_TR(Outgoing ports (Max) [
0: Disabled]:)QBT_TR[CONTEXT=OptionsDialog]
</label>
985 <input type=
"text" id=
"outgoingPortsMax" style=
"width: 15em;" />
990 <label for=
"utpTCPMixedModeAlgorithm">QBT_TR(μTP-TCP mixed mode algorithm:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#mixed_mode_algorithm" target=
"_blank">(?)
</a></label>
993 <select id=
"utpTCPMixedModeAlgorithm" style=
"width: 15em;">
994 <option value=
"0">QBT_TR(Prefer TCP)QBT_TR[CONTEXT=OptionsDialog]
</option>
995 <option value=
"1">QBT_TR(Peer proportional (throttles TCP))QBT_TR[CONTEXT=OptionsDialog]
</option>
1001 <label for=
"allowMultipleConnectionsFromTheSameIPAddress">QBT_TR(Allow multiple connections from the same IP address:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1004 <input type=
"checkbox" id=
"allowMultipleConnectionsFromTheSameIPAddress" />
1009 <label for=
"enableEmbeddedTracker">QBT_TR(Enable embedded tracker:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1012 <input type=
"checkbox" id=
"enableEmbeddedTracker" />
1017 <label for=
"embeddedTrackerPort">QBT_TR(Embedded tracker port:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1020 <input type=
"text" id=
"embeddedTrackerPort" style=
"width: 15em;" />
1025 <label for=
"uploadSlotsBehavior">QBT_TR(Upload slots behavior:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#choking_algorithm" target=
"_blank">(?)
</a></label>
1028 <select id=
"uploadSlotsBehavior" style=
"width: 15em;">
1029 <option value=
"0">QBT_TR(Fixed slots)QBT_TR[CONTEXT=OptionsDialog]
</option>
1030 <option value=
"1">QBT_TR(Upload rate based)QBT_TR[CONTEXT=OptionsDialog]
</option>
1036 <label for=
"uploadChokingAlgorithm">QBT_TR(Upload choking algorithm:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#seed_choking_algorithm" target=
"_blank">(?)
</a></label>
1039 <select id=
"uploadChokingAlgorithm" style=
"width: 15em;">
1040 <option value=
"0">QBT_TR(Round-robin)QBT_TR[CONTEXT=OptionsDialog]
</option>
1041 <option value=
"1">QBT_TR(Fastest upload)QBT_TR[CONTEXT=OptionsDialog]
</option>
1042 <option value=
"2">QBT_TR(Anti-leech)QBT_TR[CONTEXT=OptionsDialog]
</option>
1048 <label for=
"strictSuperSeeding">QBT_TR(Strict super seeding:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#strict_super_seeding" target=
"_blank">(?)
</a></label>
1051 <input type=
"checkbox" id=
"strictSuperSeeding" />
1056 <label for=
"announceAllTrackers">QBT_TR(Always announce to all trackers in a tier:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1059 <input type=
"checkbox" id=
"announceAllTrackers" />
1064 <label for=
"announceAllTiers">QBT_TR(Always announce to all tiers:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1067 <input type=
"checkbox" id=
"announceAllTiers" />
1072 <label for=
"announceIP">QBT_TR(IP Address to report to trackers (requires restart):)QBT_TR[CONTEXT=OptionsDialog]
</label>
1075 <input type=
"text" id=
"announceIP" style=
"width: 15em;" />
1082 <div style=
"text-align: center; margin-top: 1em;"><input type=
"button" value=
"QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" onclick=
"applyPreferences();" /></div>
1088 this.WatchedFoldersTable
= new HtmlTable($("watched_folders_tab"));
1090 this.updateTempDirEnabled = function() {
1091 const isTempDirEnabled
= $('temppath_checkbox').getProperty('checked');
1092 $('temppath_text').setProperty('disabled', !isTempDirEnabled
);
1095 this.addWatchFolder = function() {
1096 const new_folder
= $('new_watch_folder_txt').getProperty('value').trim();
1097 if (new_folder
.length
<= 0) return;
1099 const new_other
= $('new_watch_folder_other_txt').getProperty('value').trim();
1100 if (new_other
.length
<= 0) return;
1102 const new_select
= $('new_watch_folder_select').getProperty('value').trim();
1104 const i
= $('watched_folders_tab').getChildren('tbody')[0].getChildren('tr').length
;
1105 pushWatchFolder(i
, new_folder
, new_select
, new_other
);
1108 $('new_watch_folder_txt').setProperty('value', '');
1109 const elt
= $('new_watch_folder_select');
1110 elt
.setProperty('value', 'watch_folder');
1111 const text
= elt
.options
[elt
.selectedIndex
].innerHTML
;
1112 $('new_watch_folder_other_txt').setProperty('value', text
);
1115 this.changeWatchFolderSelect = function(item
) {
1116 if (item
.value
== "other") {
1117 item
.nextElementSibling
.hidden
= false;
1118 item
.nextElementSibling
.value
= 'QBT_TR(Type folder here)QBT_TR[CONTEXT=HttpServer]';
1119 item
.nextElementSibling
.select();
1122 item
.nextElementSibling
.hidden
= true;
1123 const text
= item
.options
[item
.selectedIndex
].innerHTML
;
1124 item
.nextElementSibling
.value
= text
;
1128 this.pushWatchFolder = function(pos
, folder
, sel
, other
) {
1129 const myinput
= "<input id='text_watch_" + pos
+ "' type='text' value='" + folder
+ "'>";
1130 const disableInput
= (sel
!= "other");
1131 const mycb
= "<div class='select-watched-folder-editable'>"
1132 + "<select id ='cb_watch_" + pos
+ "' onchange='changeWatchFolderSelect(this)'>"
1133 + "<option value='watch_folder'>QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
1134 + "<option value='default_folder'>QBT_TR(Default save location)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
1135 + "<option value='other'>QBT_TR(Other...)QBT_TR[CONTEXT=HttpServer]</option>"
1137 + "<input id='cb_watch_txt_" + pos
+ "' type='text' " + (disableInput
? "hidden " : "") + "/></div>";
1139 WatchedFoldersTable
.push([myinput
, mycb
]);
1140 $('cb_watch_' + pos
).setProperty('value', sel
);
1142 const elt
= $('cb_watch_' + pos
);
1143 other
= elt
.options
[elt
.selectedIndex
].innerHTML
;
1145 $('cb_watch_txt_' + pos
).setProperty('value', other
);
1148 this.getWatchedFolders = function() {
1149 const nb_folders
= $("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length
;
1150 const folders
= new Hash();
1151 for (let i
= 0; i
< nb_folders
; ++i
) {
1152 const fpath
= $('text_watch_' + i
).getProperty('value').trim();
1153 if (fpath
.length
> 0) {
1155 const sel
= $('cb_watch_' + i
).getProperty('value').trim();
1156 if (sel
== "other") {
1157 other
= $('cb_watch_txt_' + i
).getProperty('value').trim();
1160 other
= (sel
== "watch_folder") ? 0 : 1;
1162 folders
.set(fpath
, other
);
1168 this.updateExportDirEnabled = function() {
1169 const isExportDirEnabled
= $('exportdir_checkbox').getProperty('checked');
1170 $('exportdir_text').setProperty('disabled', !isExportDirEnabled
);
1173 this.updateExportDirFinEnabled = function() {
1174 const isExportDirFinEnabled
= $('exportdirfin_checkbox').getProperty('checked');
1175 $('exportdirfin_text').setProperty('disabled', !isExportDirFinEnabled
);
1178 this.updateMailNotification = function() {
1179 const isMailNotificationEnabled
= $('mail_notification_checkbox').getProperty('checked');
1180 $('src_email_txt').setProperty('disabled', !isMailNotificationEnabled
);
1181 $('dest_email_txt').setProperty('disabled', !isMailNotificationEnabled
);
1182 $('smtp_server_txt').setProperty('disabled', !isMailNotificationEnabled
);
1183 $('mail_ssl_checkbox').setProperty('disabled', !isMailNotificationEnabled
);
1184 $('mail_auth_checkbox').setProperty('disabled', !isMailNotificationEnabled
);
1186 if (!isMailNotificationEnabled
) {
1187 $('mail_auth_checkbox').setProperty('checked', !isMailNotificationEnabled
);
1188 updateMailAuthSettings();
1192 this.updateMailAuthSettings = function() {
1193 const isMailAuthEnabled
= $('mail_auth_checkbox').getProperty('checked');
1194 $('mail_username_text').setProperty('disabled', !isMailAuthEnabled
);
1195 $('mail_password_text').setProperty('disabled', !isMailAuthEnabled
);
1198 this.updateAutoRun = function() {
1199 const isAutoRunEnabled
= $('autorun_checkbox').getProperty('checked');
1200 $('autorunProg_txt').setProperty('disabled', !isAutoRunEnabled
);
1204 this.updateMaxConnecEnabled = function() {
1205 const isMaxConnecEnabled
= $('max_connec_checkbox').getProperty('checked');
1206 $('max_connec_value').setProperty('disabled', !isMaxConnecEnabled
);
1209 this.updateMaxConnecPerTorrentEnabled = function() {
1210 const isMaxConnecPerTorrentEnabled
= $('max_connec_per_torrent_checkbox').getProperty('checked');
1211 $('max_connec_per_torrent_value').setProperty('disabled', !isMaxConnecPerTorrentEnabled
);
1214 this.updateMaxUploadsEnabled = function() {
1215 const isMaxUploadsEnabled
= $('max_uploads_checkbox').getProperty('checked');
1216 $('max_uploads_value').setProperty('disabled', !isMaxUploadsEnabled
);
1219 this.updateMaxUploadsPerTorrentEnabled = function() {
1220 const isMaxUploadsPerTorrentEnabled
= $('max_uploads_per_torrent_checkbox').getProperty('checked');
1221 $('max_uploads_per_torrent_value').setProperty('disabled', !isMaxUploadsPerTorrentEnabled
);
1224 this.updatePeerProxySettings = function() {
1225 const isPeerProxyTypeSelected
= $('peer_proxy_type_select').getProperty('value') != "none";
1226 $('peer_proxy_host_text').setProperty('disabled', !isPeerProxyTypeSelected
);
1227 $('peer_proxy_port_value').setProperty('disabled', !isPeerProxyTypeSelected
);
1228 $('use_peer_proxy_checkbox').setProperty('disabled', !isPeerProxyTypeSelected
);
1229 $('proxy_only_for_torrents_checkbox').setProperty('disabled', !isPeerProxyTypeSelected
);
1231 if (isPeerProxyTypeSelected
) {
1232 const isPeerProxyTypeSocks5
= $('peer_proxy_type_select').getProperty('value') == "socks5";
1233 $('peer_proxy_auth_checkbox').setProperty('disabled', !isPeerProxyTypeSocks5
);
1235 if (!isPeerProxyTypeSocks5
) {
1236 $('peer_proxy_auth_checkbox').setProperty('checked', isPeerProxyTypeSocks5
);
1237 updatePeerProxyAuthSettings();
1241 $('peer_proxy_auth_checkbox').setProperty('disabled', !isPeerProxyTypeSelected
);
1242 $('peer_proxy_auth_checkbox').setProperty('checked', isPeerProxyTypeSelected
);
1243 updatePeerProxyAuthSettings();
1247 this.updatePeerProxyAuthSettings = function() {
1248 const isPeerProxyAuthEnabled
= $('peer_proxy_auth_checkbox').getProperty('checked');
1249 $('peer_proxy_username_text').setProperty('disabled', !isPeerProxyAuthEnabled
);
1250 $('peer_proxy_password_text').setProperty('disabled', !isPeerProxyAuthEnabled
);
1253 this.updateFilterSettings = function() {
1254 const isIPFilterEnabled
= $('ipfilter_enabled_checkbox').getProperty('checked');
1255 $('ipfilter_text').setProperty('disabled', !isIPFilterEnabled
);
1256 $('ipfilter_trackers_checkbox').setProperty('disabled', !isIPFilterEnabled
);
1257 $('banned_IPs_textarea').setProperty('disabled', !isIPFilterEnabled
);
1261 this.updateSchedulingEnabled = function() {
1262 const isLimitSchedulingEnabled
= $('limit_sheduling_checkbox').getProperty('checked');
1263 $('schedule_from_hour').setProperty('disabled', !isLimitSchedulingEnabled
);
1264 $('schedule_from_min').setProperty('disabled', !isLimitSchedulingEnabled
);
1265 $('schedule_to_hour').setProperty('disabled', !isLimitSchedulingEnabled
);
1266 $('schedule_to_min').setProperty('disabled', !isLimitSchedulingEnabled
);
1267 $('schedule_freq_select').setProperty('disabled', !isLimitSchedulingEnabled
);
1271 this.updateQueueingSystem = function() {
1272 const isQueueingEnabled
= $('queueing_checkbox').getProperty('checked');
1273 $('max_active_dl_value').setProperty('disabled', !isQueueingEnabled
);
1274 $('max_active_up_value').setProperty('disabled', !isQueueingEnabled
);
1275 $('max_active_to_value').setProperty('disabled', !isQueueingEnabled
);
1276 $('dont_count_slow_torrents_checkbox').setProperty('disabled', !isQueueingEnabled
);
1277 updateSlowTorrentsSettings();
1280 this.updateSlowTorrentsSettings = function() {
1281 const isDontCountSlowTorrentsEnabled
= (!$('dont_count_slow_torrents_checkbox').getProperty('disabled')) && $('dont_count_slow_torrents_checkbox').getProperty('checked');
1282 $('dl_rate_threshold').setProperty('disabled', !isDontCountSlowTorrentsEnabled
);
1283 $('ul_rate_threshold').setProperty('disabled', !isDontCountSlowTorrentsEnabled
);
1284 $('torrent_inactive_timer').setProperty('disabled', !isDontCountSlowTorrentsEnabled
);
1287 this.updateMaxRatioTimeEnabled = function() {
1288 const isMaxRatioEnabled
= $('max_ratio_checkbox').getProperty('checked');
1289 $('max_ratio_value').setProperty('disabled', !isMaxRatioEnabled
);
1291 const isMaxSeedingTimeEnabled
= $('max_seeding_time_checkbox').getProperty('checked');
1292 $('max_seeding_time_value').setProperty('disabled', !isMaxSeedingTimeEnabled
);
1294 $('max_ratio_act').setProperty('disabled', !(isMaxRatioEnabled
|| isMaxSeedingTimeEnabled
));
1297 this.updateAddTrackersEnabled = function() {
1298 const isAddTrackersEnabled
= $('add_trackers_checkbox').getProperty('checked');
1299 $('add_trackers_textarea').setProperty('disabled', !isAddTrackersEnabled
);
1303 this.updateHttpsSettings = function() {
1304 const isUseHttpsEnabled
= $('use_https_checkbox').getProperty('checked');
1305 $('ssl_cert_text').setProperty('disabled', !isUseHttpsEnabled
);
1306 $('ssl_key_text').setProperty('disabled', !isUseHttpsEnabled
);
1309 this.updateBypasssAuthSettings = function() {
1310 const isBypassAuthSubnetWhitelistEnabled
= $('bypass_auth_subnet_whitelist_checkbox').getProperty('checked');
1311 $('bypass_auth_subnet_whitelist_textarea').setProperty('disabled', !isBypassAuthSubnetWhitelistEnabled
);
1314 this.updateAlternativeWebUISettings = function() {
1315 const isUseAlternativeWebUIEnabled
= $('use_alt_webui_checkbox').getProperty('checked');
1316 $('webui_files_location_textarea').setProperty('disabled', !isUseAlternativeWebUIEnabled
);
1319 this.updateHostHeaderValidationSettings = function() {
1320 const isHostHeaderValidationEnabled
= $('host_header_validation_checkbox').getProperty('checked');
1321 $('webui_domain_textarea').setProperty('disabled', !isHostHeaderValidationEnabled
);
1324 this.updateDynDnsSettings = function() {
1325 const isDynDnsEnabled
= $('use_dyndns_checkbox').getProperty('checked');
1326 $('dyndns_select').setProperty('disabled', !isDynDnsEnabled
);
1327 $('dyndns_domain_text').setProperty('disabled', !isDynDnsEnabled
);
1328 $('dyndns_username_text').setProperty('disabled', !isDynDnsEnabled
);
1329 $('dyndns_password_text').setProperty('disabled', !isDynDnsEnabled
);
1332 this.registerDynDns = function() {
1333 if ($('dyndns_select').getProperty('value').toInt() == 1) {
1334 window
.open("http://www.no-ip.com/services/managed_dns/free_dynamic_dns.html", "NO-IP Registration");
1337 window
.open("https://www.dyndns.com/account/services/hosts/add.html", "DynDNS Registration");
1341 this.generateRandomPort = function() {
1344 const port
= Math
.floor(Math
.random() * (max
- min
+ 1) + min
);
1345 $('port_value').setProperty('value', port
);
1348 this.time_padding = function(val
) {
1349 let ret
= val
.toString();
1350 if (ret
.length
== 1)
1356 this.updateNetworkInterfaces = function(default_iface
) {
1357 const url
= 'api/v2/app/networkInterfaceList';
1358 $('networkInterface').empty();
1363 onFailure: function() {
1364 alert("Could not contact qBittorrent");
1366 onSuccess: function(ifaces
) {
1367 if (!ifaces
) return;
1369 $('networkInterface').options
.add(new Option('QBT_TR(Any interface)QBT_TR[CONTEXT=OptionsDialog]', ''));
1370 ifaces
.forEach(function(item
, index
) {
1371 $('networkInterface').options
.add(new Option(item
.name
, item
.value
));
1373 $('networkInterface').setProperty('value', default_iface
);
1378 this.updateInterfaceAddresses = function(iface
, default_addr
) {
1379 const url
= 'api/v2/app/networkInterfaceAddressList';
1380 $('optionalIPAddressToBind').empty();
1388 onFailure: function() {
1389 alert("Could not contact qBittorrent");
1391 onSuccess: function(addresses
) {
1392 if (!addresses
) return;
1394 $('optionalIPAddressToBind').options
.add(new Option('QBT_TR(All addresses)QBT_TR[CONTEXT=OptionDialog]', ''));
1395 addresses
.forEach(function(item
, index
) {
1396 $('optionalIPAddressToBind').options
.add(new Option(item
, item
));
1398 $('optionalIPAddressToBind').setProperty('value', default_addr
);
1403 this.loadPreferences = function() {
1404 const url
= 'api/v2/app/preferences';
1409 onFailure: function() {
1410 alert("Could not contact qBittorrent");
1412 onSuccess: function(pref
) {
1415 // When adding a torrent
1416 $('createsubfolder_checkbox').setProperty('checked', pref
.create_subfolder_enabled
);
1417 $('dontstartdownloads_checkbox').setProperty('checked', pref
.start_paused_enabled
);
1418 $('deletetorrentfileafter_checkbox').setProperty('checked', pref
.auto_delete_mode
);
1420 $('preallocateall_checkbox').setProperty('checked', pref
.preallocate_all
);
1421 $('appendext_checkbox').setProperty('checked', pref
.incomplete_files_ext
);
1423 // Saving Managmenet
1424 $('default_tmm_combobox').setProperty('value', pref
.auto_tmm_enabled
);
1425 $('torrent_changed_tmm_combobox').setProperty('value', pref
.torrent_changed_tmm_enabled
);
1426 $('save_path_changed_tmm_combobox').setProperty('value', pref
.save_path_changed_tmm_enabled
);
1427 $('category_changed_tmm_combobox').setProperty('value', pref
.category_changed_tmm_enabled
);
1428 $('savepath_text').setProperty('value', pref
.save_path
);
1429 $('temppath_checkbox').setProperty('checked', pref
.temp_path_enabled
);
1430 $('temppath_text').setProperty('value', pref
.temp_path
);
1431 updateTempDirEnabled();
1432 if (pref
.export_dir
!= '') {
1433 $('exportdir_checkbox').setProperty('checked', true);
1434 $('exportdir_text').setProperty('value', pref
.export_dir
);
1437 $('exportdir_checkbox').setProperty('checked', false);
1438 $('exportdir_text').setProperty('value', '');
1440 updateExportDirEnabled();
1441 if (pref
.export_dir_fin
!= '') {
1442 $('exportdirfin_checkbox').setProperty('checked', true);
1443 $('exportdirfin_text').setProperty('value', pref
.export_dir_fin
);
1446 $('exportdirfin_checkbox').setProperty('checked', false);
1447 $('exportdirfin_text').setProperty('value', '');
1449 updateExportDirFinEnabled();
1451 // Automatically add torrents from
1453 for (const folder
in pref
.scan_dirs
) {
1456 if (typeof pref
.scan_dirs
[folder
] == "string") {
1457 other
= pref
.scan_dirs
[folder
];
1461 sel
= (pref
.scan_dirs
[folder
] == 0) ? "watch_folder" : "default_folder";
1463 pushWatchFolder(i
++, folder
, sel
, other
);
1466 // Email notification upon download completion
1467 $('mail_notification_checkbox').setProperty('checked', pref
.mail_notification_enabled
);
1468 $('src_email_txt').setProperty('value', pref
.mail_notification_sender
);
1469 $('dest_email_txt').setProperty('value', pref
.mail_notification_email
);
1470 $('smtp_server_txt').setProperty('value', pref
.mail_notification_smtp
);
1471 $('mail_ssl_checkbox').setProperty('checked', pref
.mail_notification_ssl_enabled
);
1472 $('mail_auth_checkbox').setProperty('checked', pref
.mail_notification_auth_enabled
);
1473 $('mail_username_text').setProperty('value', pref
.mail_notification_username
);
1474 $('mail_password_text').setProperty('value', pref
.mail_notification_password
);
1475 updateMailNotification();
1476 updateMailAuthSettings();
1478 // Run an external program on torrent completion
1479 $('autorun_checkbox').setProperty('checked', pref
.autorun_enabled
);
1480 $('autorunProg_txt').setProperty('value', pref
.autorun_program
);
1485 $('port_value').setProperty('value', pref
.listen_port
.toInt());
1486 $('upnp_checkbox').setProperty('checked', pref
.upnp
);
1487 $('random_port_checkbox').setProperty('checked', pref
.random_port
);
1489 // Connections Limits
1490 const max_connec
= pref
.max_connec
.toInt();
1491 if (max_connec
<= 0) {
1492 $('max_connec_checkbox').setProperty('checked', false);
1493 $('max_connec_value').setProperty('value', 500);
1496 $('max_connec_checkbox').setProperty('checked', true);
1497 $('max_connec_value').setProperty('value', max_connec
);
1499 updateMaxConnecEnabled();
1500 const max_connec_per_torrent
= pref
.max_connec_per_torrent
.toInt();
1501 if (max_connec_per_torrent
<= 0) {
1502 $('max_connec_per_torrent_checkbox').setProperty('checked', false);
1503 $('max_connec_per_torrent_value').setProperty('value', 100);
1506 $('max_connec_per_torrent_checkbox').setProperty('checked', true);
1507 $('max_connec_per_torrent_value').setProperty('value', max_connec_per_torrent
);
1509 updateMaxConnecPerTorrentEnabled();
1510 const max_uploads
= pref
.max_uploads
.toInt();
1511 if (max_uploads
<= 0) {
1512 $('max_uploads_checkbox').setProperty('checked', false);
1513 $('max_uploads_value').setProperty('value', 8);
1516 $('max_uploads_checkbox').setProperty('checked', true);
1517 $('max_uploads_value').setProperty('value', max_uploads
);
1519 updateMaxUploadsEnabled();
1520 const max_uploads_per_torrent
= pref
.max_uploads_per_torrent
.toInt();
1521 if (max_uploads_per_torrent
<= 0) {
1522 $('max_uploads_per_torrent_checkbox').setProperty('checked', false);
1523 $('max_uploads_per_torrent_value').setProperty('value', 4);
1526 $('max_uploads_per_torrent_checkbox').setProperty('checked', true);
1527 $('max_uploads_per_torrent_value').setProperty('value', max_uploads_per_torrent
);
1529 updateMaxUploadsPerTorrentEnabled();
1532 switch (pref
.proxy_type
.toInt()) {
1534 $('peer_proxy_type_select').setProperty('value', 'socks4');
1537 case 4: // SOCKS5_PW
1538 $('peer_proxy_type_select').setProperty('value', 'socks5');
1542 $('peer_proxy_type_select').setProperty('value', 'http');
1545 $('peer_proxy_type_select').setProperty('value', 'none');
1547 updatePeerProxySettings();
1548 $('peer_proxy_host_text').setProperty('value', pref
.proxy_ip
);
1549 $('peer_proxy_port_value').setProperty('value', pref
.proxy_port
);
1550 $('use_peer_proxy_checkbox').setProperty('checked', pref
.proxy_peer_connections
);
1551 $('proxy_only_for_torrents_checkbox').setProperty('checked', pref
.proxy_torrents_only
);
1552 $('peer_proxy_auth_checkbox').setProperty('checked', pref
.proxy_auth_enabled
);
1553 updatePeerProxyAuthSettings();
1554 $('peer_proxy_username_text').setProperty('value', pref
.proxy_username
);
1555 $('peer_proxy_password_text').setProperty('value', pref
.proxy_password
);
1558 $('ipfilter_enabled_checkbox').setProperty('checked', pref
.ip_filter_enabled
);
1559 $('ipfilter_text').setProperty('value', pref
.ip_filter_path
);
1560 $('ipfilter_trackers_checkbox').setProperty('checked', pref
.ip_filter_trackers
);
1561 $('banned_IPs_textarea').setProperty('value', pref
.banned_IPs
);
1562 updateFilterSettings();
1565 // Global Rate Limits
1566 $('up_limit_value').setProperty('value', (pref
.up_limit
.toInt() / 1024));
1567 $('dl_limit_value').setProperty('value', (pref
.dl_limit
.toInt() / 1024));
1568 // Alternative Global Rate Limits
1569 $('alt_up_limit_value').setProperty('value', (pref
.alt_up_limit
.toInt() / 1024));
1570 $('alt_dl_limit_value').setProperty('value', (pref
.alt_dl_limit
.toInt() / 1024));
1572 $('enable_protocol_combobox').setProperty('value', pref
.bittorrent_protocol
);
1573 $('limit_utp_rate_checkbox').setProperty('checked', pref
.limit_utp_rate
);
1574 $('limit_tcp_overhead_checkbox').setProperty('checked', pref
.limit_tcp_overhead
);
1575 $('limit_lan_peers_checkbox').setProperty('checked', pref
.limit_lan_peers
);
1578 $('limit_sheduling_checkbox').setProperty('checked', pref
.scheduler_enabled
);
1579 $('schedule_from_hour').setProperty('value', time_padding(pref
.schedule_from_hour
));
1580 $('schedule_from_min').setProperty('value', time_padding(pref
.schedule_from_min
));
1581 $('schedule_to_hour').setProperty('value', time_padding(pref
.schedule_to_hour
));
1582 $('schedule_to_min').setProperty('value', time_padding(pref
.schedule_to_min
));
1583 $('schedule_freq_select').setProperty('value', pref
.scheduler_days
);
1584 updateSchedulingEnabled();
1588 $('dht_checkbox').setProperty('checked', pref
.dht
);
1589 $('pex_checkbox').setProperty('checked', pref
.pex
);
1590 $('lsd_checkbox').setProperty('checked', pref
.lsd
);
1591 const encryption
= pref
.encryption
.toInt();
1592 $('encryption_select').getChildren('option')[encryption
].setAttribute('selected', '');
1593 $('anonymous_mode_checkbox').setProperty('checked', pref
.anonymous_mode
);
1596 $('queueing_checkbox').setProperty('checked', pref
.queueing_enabled
);
1597 $('max_active_dl_value').setProperty('value', pref
.max_active_downloads
.toInt());
1598 $('max_active_up_value').setProperty('value', pref
.max_active_uploads
.toInt());
1599 $('max_active_to_value').setProperty('value', pref
.max_active_torrents
.toInt());
1600 $('dont_count_slow_torrents_checkbox').setProperty('checked', pref
.dont_count_slow_torrents
);
1601 $('dl_rate_threshold').setProperty('value', pref
.slow_torrent_dl_rate_threshold
.toInt());
1602 $('ul_rate_threshold').setProperty('value', pref
.slow_torrent_ul_rate_threshold
.toInt());
1603 $('torrent_inactive_timer').setProperty('value', pref
.slow_torrent_inactive_timer
.toInt());
1604 updateQueueingSystem();
1607 $('max_ratio_checkbox').setProperty('checked', pref
.max_ratio_enabled
);
1608 if (pref
.max_ratio_enabled
)
1609 $('max_ratio_value').setProperty('value', pref
.max_ratio
);
1611 $('max_ratio_value').setProperty('value', 1);
1612 $('max_seeding_time_checkbox').setProperty('checked', pref
.max_seeding_time_enabled
);
1613 if (pref
.max_seeding_time_enabled
)
1614 $('max_seeding_time_value').setProperty('value', pref
.max_seeding_time
.toInt());
1616 $('max_seeding_time_value').setProperty('value', 1440);
1617 const max_ratio_act
= pref
.max_ratio_act
.toInt();
1618 $('max_ratio_act').getChildren('option')[max_ratio_act
].setAttribute('selected', '');
1619 updateMaxRatioTimeEnabled();
1622 $('add_trackers_checkbox').setProperty('checked', pref
.add_trackers_enabled
);
1623 $('add_trackers_textarea').setProperty('value', pref
.add_trackers
);
1624 updateAddTrackersEnabled();
1628 $('locale_select').setProperty('value', pref
.locale
);
1631 $('webui_domain_textarea').setProperty('value', pref
.web_ui_domain_list
);
1632 $('webui_address_value').setProperty('value', pref
.web_ui_address
);
1633 $('webui_port_value').setProperty('value', pref
.web_ui_port
);
1634 $('webui_upnp_checkbox').setProperty('checked', pref
.web_ui_upnp
);
1635 $('use_https_checkbox').setProperty('checked', pref
.use_https
);
1636 $('ssl_cert_text').setProperty('value', pref
.web_ui_https_cert_path
);
1637 $('ssl_key_text').setProperty('value', pref
.web_ui_https_key_path
);
1638 updateHttpsSettings();
1641 $('webui_username_text').setProperty('value', pref
.web_ui_username
);
1642 $('bypass_local_auth_checkbox').setProperty('checked', pref
.bypass_local_auth
);
1643 $('bypass_auth_subnet_whitelist_checkbox').setProperty('checked', pref
.bypass_auth_subnet_whitelist_enabled
);
1644 $('bypass_auth_subnet_whitelist_textarea').setProperty('value', pref
.bypass_auth_subnet_whitelist
);
1645 updateBypasssAuthSettings();
1646 $('webUISessionTimeoutInput').setProperty('value', pref
.web_ui_session_timeout
.toInt());
1648 // Use alternative Web UI
1649 $('use_alt_webui_checkbox').setProperty('checked', pref
.alternative_webui_enabled
);
1650 $('webui_files_location_textarea').setProperty('value', pref
.alternative_webui_path
);
1651 updateAlternativeWebUISettings();
1654 $('clickjacking_protection_checkbox').setProperty('checked', pref
.web_ui_clickjacking_protection_enabled
);
1655 $('csrf_protection_checkbox').setProperty('checked', pref
.web_ui_csrf_protection_enabled
);
1656 $('host_header_validation_checkbox').setProperty('checked', pref
.web_ui_host_header_validation_enabled
);
1657 updateHostHeaderValidationSettings();
1659 // Update my dynamic domain name
1660 $('use_dyndns_checkbox').setProperty('checked', pref
.dyndns_enabled
);
1661 $('dyndns_select').setProperty('value', pref
.dyndns_service
);
1662 $('dyndns_domain_text').setProperty('value', pref
.dyndns_domain
);
1663 $('dyndns_username_text').setProperty('value', pref
.dyndns_username
);
1664 $('dyndns_password_text').setProperty('value', pref
.dyndns_password
);
1665 updateDynDnsSettings();
1667 // Advanced settings
1668 // qBittorrent section
1669 updateNetworkInterfaces(pref
.current_network_interface
);
1670 updateInterfaceAddresses(pref
.current_network_interface
, pref
.current_interface_address
);
1671 $('listenOnIPv6Address').setProperty('checked', pref
.listen_on_ipv6_address
);
1672 $('saveResumeDataInterval').setProperty('value', pref
.save_resume_data_interval
);
1673 $('recheckTorrentsOnCompletion').setProperty('checked', pref
.recheck_completed_torrents
);
1674 $('resolvePeerCountries').setProperty('checked', pref
.resolve_peer_countries
);
1675 // libtorrent section
1676 $('asyncIOThreads').setProperty('value', pref
.async_io_threads
);
1677 $('filePoolSize').setProperty('value', pref
.file_pool_size
);
1678 $('outstandMemoryWhenCheckingTorrents').setProperty('value', pref
.checking_memory_use
);
1679 $('diskCache').setProperty('value', pref
.disk_cache
);
1680 $('diskCacheExpiryInterval').setProperty('value', pref
.disk_cache_ttl
);
1681 $('enableOSCache').setProperty('checked', pref
.enable_os_cache
);
1682 $('coalesceReadsAndWrites').setProperty('checked', pref
.enable_coalesce_read_write
);
1683 $('sendUploadPieceSuggestions').setProperty('checked', pref
.enable_upload_suggestions
);
1684 $('sendBufferWatermark').setProperty('value', pref
.send_buffer_watermark
);
1685 $('sendBufferLowWatermark').setProperty('value', pref
.send_buffer_low_watermark
);
1686 $('sendBufferWatermarkFactor').setProperty('value', pref
.send_buffer_watermark_factor
);
1687 $('socketBacklogSize').setProperty('value', pref
.socket_backlog_size
);
1688 $('outgoingPortsMin').setProperty('value', pref
.outgoing_ports_min
);
1689 $('outgoingPortsMax').setProperty('value', pref
.outgoing_ports_max
);
1690 $('utpTCPMixedModeAlgorithm').setProperty('value', pref
.utp_tcp_mixed_mode
);
1691 $('allowMultipleConnectionsFromTheSameIPAddress').setProperty('checked', pref
.enable_multi_connections_from_same_ip
);
1692 $('enableEmbeddedTracker').setProperty('checked', pref
.enable_embedded_tracker
);
1693 $('embeddedTrackerPort').setProperty('value', pref
.embedded_tracker_port
);
1694 $('uploadSlotsBehavior').setProperty('value', pref
.upload_slots_behavior
);
1695 $('uploadChokingAlgorithm').setProperty('value', pref
.upload_choking_algorithm
);
1696 $('strictSuperSeeding').setProperty('checked', pref
.enable_super_seeding
);
1697 $('announceAllTrackers').setProperty('checked', pref
.announce_to_all_trackers
);
1698 $('announceAllTiers').setProperty('checked', pref
.announce_to_all_tiers
);
1699 $('announceIP').setProperty('value', pref
.announce_ip
);
1705 this.applyPreferences = function() {
1706 const settings
= new Hash();
1707 // Validate form data
1709 // When adding a torrent
1710 settings
.set('create_subfolder_enabled', $('createsubfolder_checkbox').getProperty('checked'));
1711 settings
.set('start_paused_enabled', $('dontstartdownloads_checkbox').getProperty('checked'));
1712 settings
.set('auto_delete_mode', $('deletetorrentfileafter_checkbox').getProperty('checked'));
1714 settings
.set('preallocate_all', $('preallocateall_checkbox').getProperty('checked'));
1715 settings
.set('incomplete_files_ext', $('appendext_checkbox').getProperty('checked'));
1717 // Saving Management
1718 settings
.set('auto_tmm_enabled', $('default_tmm_combobox').getProperty('value'));
1719 settings
.set('torrent_changed_tmm_enabled', $('torrent_changed_tmm_combobox').getProperty('value'));
1720 settings
.set('save_path_changed_tmm_enabled', $('save_path_changed_tmm_combobox').getProperty('value'));
1721 settings
.set('category_changed_tmm_enabled', $('category_changed_tmm_combobox').getProperty('value'));
1722 settings
.set('save_path', $('savepath_text').getProperty('value'));
1723 settings
.set('temp_path_enabled', $('temppath_checkbox').getProperty('checked'));
1724 settings
.set('temp_path', $('temppath_text').getProperty('value'));
1725 if ($('exportdir_checkbox').getProperty('checked'))
1726 settings
.set('export_dir', $('exportdir_text').getProperty('value'));
1728 settings
.set('export_dir', '');
1729 if ($('exportdirfin_checkbox').getProperty('checked'))
1730 settings
.set('export_dir_fin', $('exportdirfin_text').getProperty('value'));
1732 settings
.set('export_dir_fin', '');
1734 // Automatically add torrents from
1735 settings
.set('scan_dirs', getWatchedFolders());
1737 // Email notification upon download completion
1738 settings
.set('mail_notification_enabled', $('mail_notification_checkbox').getProperty('checked'));
1739 settings
.set('mail_notification_sender', $('src_email_txt').getProperty('value'));
1740 settings
.set('mail_notification_email', $('dest_email_txt').getProperty('value'));
1741 settings
.set('mail_notification_smtp', $('smtp_server_txt').getProperty('value'));
1742 settings
.set('mail_notification_ssl_enabled', $('mail_ssl_checkbox').getProperty('checked'));
1743 settings
.set('mail_notification_auth_enabled', $('mail_auth_checkbox').getProperty('checked'));
1744 settings
.set('mail_notification_username', $('mail_username_text').getProperty('value'));
1745 settings
.set('mail_notification_password', $('mail_password_text').getProperty('value'));
1747 // Run an external program on torrent completion
1748 settings
.set('autorun_enabled', $('autorun_checkbox').getProperty('checked'));
1749 settings
.set('autorun_program', $('autorunProg_txt').getProperty('value'));
1753 const listen_port
= $('port_value').getProperty('value').toInt();
1754 if (isNaN(listen_port
) || listen_port
< 1 || listen_port
> 65535) {
1755 alert("QBT_TR(The port used for incoming connections must be between 1 and 65535.)QBT_TR[CONTEXT=HttpServer]");
1758 settings
.set('listen_port', listen_port
);
1759 settings
.set('upnp', $('upnp_checkbox').getProperty('checked'));
1760 settings
.set('random_port', $('random_port_checkbox').getProperty('checked'));
1762 // Connections Limits
1763 let max_connec
= -1;
1764 if ($('max_connec_checkbox').getProperty('checked')) {
1765 max_connec
= $('max_connec_value').getProperty('value').toInt();
1766 if (isNaN(max_connec
) || max_connec
<= 0) {
1767 alert("QBT_TR(Maximum number of connections limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
1771 settings
.set('max_connec', max_connec
);
1772 let max_connec_per_torrent
= -1;
1773 if ($('max_connec_per_torrent_checkbox').getProperty('checked')) {
1774 max_connec_per_torrent
= $('max_connec_per_torrent_value').getProperty('value').toInt();
1775 if (isNaN(max_connec_per_torrent
) || max_connec_per_torrent
<= 0) {
1776 alert("QBT_TR(Maximum number of connections per torrent limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
1780 settings
.set('max_connec_per_torrent', max_connec_per_torrent
);
1781 let max_uploads
= -1;
1782 if ($('max_uploads_checkbox').getProperty('checked')) {
1783 max_uploads
= $('max_uploads_value').getProperty('value').toInt();
1784 if (isNaN(max_uploads
) || max_uploads
<= 0) {
1785 alert("QBT_TR(Global number of upload slots limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
1789 settings
.set('max_uploads', max_uploads
);
1790 let max_uploads_per_torrent
= -1;
1791 if ($('max_uploads_per_torrent_checkbox').getProperty('checked')) {
1792 max_uploads_per_torrent
= $('max_uploads_per_torrent_value').getProperty('value').toInt();
1793 if (isNaN(max_uploads_per_torrent
) || max_uploads_per_torrent
<= 0) {
1794 alert("QBT_TR(Maximum number of upload slots per torrent limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
1798 settings
.set('max_uploads_per_torrent', max_uploads_per_torrent
);
1801 const proxy_type_str
= $('peer_proxy_type_select').getProperty('value');
1803 let proxy_auth_enabled
= false;
1804 if (proxy_type_str
== "socks5") {
1805 if ($('peer_proxy_auth_checkbox').getProperty('checked')) {
1807 proxy_auth_enabled
= true;
1814 if (proxy_type_str
== "socks4") {
1818 if (proxy_type_str
== "http") {
1819 if ($('peer_proxy_auth_checkbox').getProperty('checked')) {
1821 proxy_auth_enabled
= true;
1829 settings
.set('proxy_type', proxy_type
);
1830 settings
.set('proxy_auth_enabled', proxy_auth_enabled
);
1831 settings
.set('proxy_ip', $('peer_proxy_host_text').getProperty('value'));
1832 settings
.set('proxy_port', $('peer_proxy_port_value').getProperty('value').toInt());
1833 settings
.set('proxy_peer_connections', $('use_peer_proxy_checkbox').getProperty('checked'));
1834 settings
.set('proxy_torrents_only', $('proxy_only_for_torrents_checkbox').getProperty('checked'));
1835 settings
.set('proxy_username', $('peer_proxy_username_text').getProperty('value'));
1836 settings
.set('proxy_password', $('peer_proxy_password_text').getProperty('value'));
1839 settings
.set('ip_filter_enabled', $('ipfilter_enabled_checkbox').getProperty('checked'));
1840 settings
.set('ip_filter_path', $('ipfilter_text').getProperty('value'));
1841 settings
.set('ip_filter_trackers', $('ipfilter_trackers_checkbox').getProperty('checked'));
1842 settings
.set('banned_IPs', $('banned_IPs_textarea').getProperty('value'));
1845 // Global Rate Limits
1846 const up_limit
= $('up_limit_value').getProperty('value').toInt() * 1024;
1847 if (isNaN(up_limit
) || up_limit
< 0) {
1848 alert("QBT_TR(Global upload rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
1851 settings
.set('up_limit', up_limit
);
1853 const dl_limit
= $('dl_limit_value').getProperty('value').toInt() * 1024;
1854 if (isNaN(dl_limit
) || dl_limit
< 0) {
1855 alert("QBT_TR(Global download rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
1858 settings
.set('dl_limit', dl_limit
);
1860 // Alternative Global Rate Limits
1861 const alt_up_limit
= $('alt_up_limit_value').getProperty('value').toInt() * 1024;
1862 if (isNaN(alt_up_limit
) || alt_up_limit
< 0) {
1863 alert("QBT_TR(Alternative upload rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
1866 settings
.set('alt_up_limit', alt_up_limit
);
1868 const alt_dl_limit
= $('alt_dl_limit_value').getProperty('value').toInt() * 1024;
1869 if (isNaN(alt_dl_limit
) || alt_dl_limit
< 0) {
1870 alert("QBT_TR(Alternative download rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
1873 settings
.set('alt_dl_limit', alt_dl_limit
);
1875 settings
.set('bittorrent_protocol', $('enable_protocol_combobox').getProperty('value'));
1876 settings
.set('limit_utp_rate', $('limit_utp_rate_checkbox').getProperty('checked'));
1877 settings
.set('limit_tcp_overhead', $('limit_tcp_overhead_checkbox').getProperty('checked'));
1878 settings
.set('limit_lan_peers', $('limit_lan_peers_checkbox').getProperty('checked'));
1881 const scheduling_enabled
= $('limit_sheduling_checkbox').getProperty('checked');
1882 settings
.set('scheduler_enabled', scheduling_enabled
);
1883 if (scheduling_enabled
) {
1884 settings
.set('schedule_from_hour', $('schedule_from_hour').getProperty('value').toInt());
1885 settings
.set('schedule_from_min', $('schedule_from_min').getProperty('value').toInt());
1886 settings
.set('schedule_to_hour', $('schedule_to_hour').getProperty('value').toInt());
1887 settings
.set('schedule_to_min', $('schedule_to_min').getProperty('value').toInt());
1888 settings
.set('scheduler_days', $('schedule_freq_select').getProperty('value').toInt());
1893 settings
.set('dht', $('dht_checkbox').getProperty('checked'));
1894 settings
.set('pex', $('pex_checkbox').getProperty('checked'));
1895 settings
.set('lsd', $('lsd_checkbox').getProperty('checked'));
1896 settings
.set('encryption', $('encryption_select').getSelected()[0].getProperty('value'));
1897 settings
.set('anonymous_mode', $('anonymous_mode_checkbox').getProperty('checked'));
1900 settings
.set('queueing_enabled', $('queueing_checkbox').getProperty('checked'));
1901 if ($('queueing_checkbox').getProperty('checked')) {
1902 const max_active_downloads
= $('max_active_dl_value').getProperty('value').toInt();
1903 if (isNaN(max_active_downloads
) || max_active_downloads
< -1) {
1904 alert("QBT_TR(Maximum active downloads must be greater than -1.)QBT_TR[CONTEXT=HttpServer]");
1907 settings
.set('max_active_downloads', max_active_downloads
);
1908 const max_active_uploads
= $('max_active_up_value').getProperty('value').toInt();
1909 if (isNaN(max_active_uploads
) || max_active_uploads
< -1) {
1910 alert("QBT_TR(Maximum active uploads must be greater than -1.)QBT_TR[CONTEXT=HttpServer]");
1913 settings
.set('max_active_uploads', max_active_uploads
);
1914 const max_active_torrents
= $('max_active_to_value').getProperty('value').toInt();
1915 if (isNaN(max_active_torrents
) || max_active_torrents
< -1) {
1916 alert("QBT_TR(Maximum active torrents must be greater than -1.)QBT_TR[CONTEXT=HttpServer]");
1919 settings
.set('max_active_torrents', max_active_torrents
);
1920 settings
.set('dont_count_slow_torrents', $('dont_count_slow_torrents_checkbox').getProperty('checked'));
1921 const dl_rate_threshold
= $('dl_rate_threshold').getProperty('value').toInt();
1922 if (isNaN(dl_rate_threshold
) || (dl_rate_threshold
< 1)) {
1923 alert("QBT_TR(Download rate threshold must be greater than 0.)QBT_TR[CONTEXT=HttpServer]");
1926 settings
.set('slow_torrent_dl_rate_threshold', dl_rate_threshold
);
1927 const ul_rate_threshold
= $('ul_rate_threshold').getProperty('value').toInt();
1928 if (isNaN(ul_rate_threshold
) || (ul_rate_threshold
< 1)) {
1929 alert("QBT_TR(Upload rate threshold must be greater than 0.)QBT_TR[CONTEXT=HttpServer]");
1932 settings
.set('slow_torrent_ul_rate_threshold', ul_rate_threshold
);
1933 const torrent_inactive_timer
= $('torrent_inactive_timer').getProperty('value').toInt();
1934 if (isNaN(torrent_inactive_timer
) || (torrent_inactive_timer
< 1)) {
1935 alert("QBT_TR(Torrent inactivity timer must be greater than 0.)QBT_TR[CONTEXT=HttpServer]");
1938 settings
.set('slow_torrent_inactive_timer', torrent_inactive_timer
);
1941 // Share Ratio Limiting
1943 if ($('max_ratio_checkbox').getProperty('checked')) {
1944 max_ratio
= $('max_ratio_value').getProperty('value');
1945 if (isNaN(max_ratio
) || max_ratio
< 0 || max_ratio
> 9998) {
1946 alert("QBT_TR(Share ratio limit must be between 0 and 9998.)QBT_TR[CONTEXT=HttpServer]");
1950 settings
.set('max_ratio_enabled', $('max_ratio_checkbox').getProperty('checked'));
1951 settings
.set('max_ratio', max_ratio
);
1952 settings
.set('max_ratio_act', $('max_ratio_act').getProperty('value').toInt());
1954 let max_seeding_time
= -1;
1955 if ($('max_seeding_time_checkbox').getProperty('checked')) {
1956 max_seeding_time
= $('max_seeding_time_value').getProperty('value').toInt();
1957 if (isNaN(max_seeding_time
) || max_seeding_time
< 0 || max_seeding_time
> 525600) {
1958 alert("QBT_TR(Seeding time limit must be between 0 and 525600 minutes.)QBT_TR[CONTEXT=HttpServer]");
1962 settings
.set('max_seeding_time_enabled', $('max_seeding_time_checkbox').getProperty('checked'));
1963 settings
.set('max_seeding_time', max_seeding_time
);
1964 settings
.set('max_ratio_act', $('max_ratio_act').getProperty('value').toInt());
1967 settings
.set('add_trackers_enabled', $('add_trackers_checkbox').getProperty('checked'));
1968 settings
.set('add_trackers', $('add_trackers_textarea').getProperty('value'));
1972 settings
.set('locale', $('locale_select').getProperty('value'));
1975 settings
.set('web_ui_domain_list', $('webui_domain_textarea').getProperty('value'));
1976 const web_ui_address
= $('webui_address_value').getProperty('value').toString();
1977 const web_ui_port
= $('webui_port_value').getProperty('value').toInt();
1978 if (isNaN(web_ui_port
) || web_ui_port
< 1 || web_ui_port
> 65535) {
1979 alert("QBT_TR(The port used for the Web UI must be between 1 and 65535.)QBT_TR[CONTEXT=HttpServer]");
1982 settings
.set('web_ui_address', web_ui_address
);
1983 settings
.set('web_ui_port', web_ui_port
);
1984 settings
.set('web_ui_upnp', $('webui_upnp_checkbox').getProperty('checked'));
1985 settings
.set('use_https', $('use_https_checkbox').getProperty('checked'));
1986 settings
.set('web_ui_https_cert_path', $('ssl_cert_text').getProperty('value'));
1987 settings
.set('web_ui_https_key_path', $('ssl_key_text').getProperty('value'));
1990 const web_ui_username
= $('webui_username_text').getProperty('value');
1991 if (web_ui_username
.length
< 3) {
1992 alert("QBT_TR(The Web UI username must be at least 3 characters long.)QBT_TR[CONTEXT=OptionsDialog]");
1995 const web_ui_password
= $('webui_password_text').getProperty('value');
1996 if ((0 < web_ui_password
.length
) && (web_ui_password
.length
< 6)) {
1997 alert("QBT_TR(The Web UI password must be at least 6 characters long.)QBT_TR[CONTEXT=OptionsDialog]");
2001 settings
.set('web_ui_username', web_ui_username
);
2002 if (web_ui_password
.length
> 0)
2003 settings
.set('web_ui_password', web_ui_password
);
2004 settings
.set('bypass_local_auth', $('bypass_local_auth_checkbox').getProperty('checked'));
2005 settings
.set('bypass_auth_subnet_whitelist_enabled', $('bypass_auth_subnet_whitelist_checkbox').getProperty('checked'));
2006 settings
.set('bypass_auth_subnet_whitelist', $('bypass_auth_subnet_whitelist_textarea').getProperty('value'));
2007 settings
.set('web_ui_session_timeout', $('webUISessionTimeoutInput').getProperty('value'));
2009 // Use alternative Web UI
2010 const alternative_webui_enabled
= $('use_alt_webui_checkbox').getProperty('checked');
2011 const webui_files_location_textarea
= $('webui_files_location_textarea').getProperty('value');
2012 if (alternative_webui_enabled
&& (webui_files_location_textarea
.trim() === "")) {
2013 alert("QBT_TR(The alternative Web UI files location cannot be blank.)QBT_TR[CONTEXT=OptionsDialog]");
2016 settings
.set('alternative_webui_enabled', alternative_webui_enabled
);
2017 settings
.set('alternative_webui_path', webui_files_location_textarea
);
2019 settings
.set('web_ui_clickjacking_protection_enabled', $('clickjacking_protection_checkbox').getProperty('checked'));
2020 settings
.set('web_ui_csrf_protection_enabled', $('csrf_protection_checkbox').getProperty('checked'));
2021 settings
.set('web_ui_host_header_validation_enabled', $('host_header_validation_checkbox').getProperty('checked'));
2023 // Update my dynamic domain name
2024 settings
.set('dyndns_enabled', $('use_dyndns_checkbox').getProperty('checked'));
2025 settings
.set('dyndns_service', $('dyndns_select').getProperty('value'));
2026 settings
.set('dyndns_domain', $('dyndns_domain_text').getProperty('value'));
2027 settings
.set('dyndns_username', $('dyndns_username_text').getProperty('value'));
2028 settings
.set('dyndns_password', $('dyndns_password_text').getProperty('value'));
2030 // Update advanced settings
2031 // qBittorrent section
2032 settings
.set('current_network_interface', $('networkInterface').getProperty('value'));
2033 settings
.set('current_interface_address', $('optionalIPAddressToBind').getProperty('value'));
2034 settings
.set('listen_on_ipv6_address', $('listenOnIPv6Address').getProperty('checked'));
2035 settings
.set('save_resume_data_interval', $('saveResumeDataInterval').getProperty('value'));
2036 settings
.set('recheck_completed_torrents', $('recheckTorrentsOnCompletion').getProperty('checked'));
2037 settings
.set('resolve_peer_countries', $('resolvePeerCountries').getProperty('checked'));
2039 // libtorrent section
2040 settings
.set('async_io_threads', $('asyncIOThreads').getProperty('value'));
2041 settings
.set('file_pool_size', $('filePoolSize').getProperty('value'));
2042 settings
.set('checking_memory_use', $('outstandMemoryWhenCheckingTorrents').getProperty('value'));
2043 settings
.set('disk_cache', $('diskCache').getProperty('value'));
2044 settings
.set('disk_cache_ttl', $('diskCacheExpiryInterval').getProperty('value'));
2045 settings
.set('enable_os_cache', $('enableOSCache').getProperty('checked'));
2046 settings
.set('enable_coalesce_read_write', $('coalesceReadsAndWrites').getProperty('checked'));
2047 settings
.set('enable_upload_suggestions', $('sendUploadPieceSuggestions').getProperty('checked'));
2048 settings
.set('send_buffer_watermark', $('sendBufferWatermark').getProperty('value'));
2049 settings
.set('send_buffer_low_watermark', $('sendBufferLowWatermark').getProperty('value'));
2050 settings
.set('send_buffer_watermark_factor', $('sendBufferWatermarkFactor').getProperty('value'));
2051 settings
.set('socket_backlog_size', $('socketBacklogSize').getProperty('value'));
2052 settings
.set('outgoing_ports_min', $('outgoingPortsMin').getProperty('value'));
2053 settings
.set('outgoing_ports_max', $('outgoingPortsMax').getProperty('value'));
2054 settings
.set('utp_tcp_mixed_mode', $('utpTCPMixedModeAlgorithm').getProperty('value'));
2055 settings
.set('enable_multi_connections_from_same_ip', $('allowMultipleConnectionsFromTheSameIPAddress').getProperty('checked'));
2056 settings
.set('enable_embedded_tracker', $('enableEmbeddedTracker').getProperty('checked'));
2057 settings
.set('embedded_tracker_port', $('embeddedTrackerPort').getProperty('value'));
2058 settings
.set('upload_slots_behavior', $('uploadSlotsBehavior').getProperty('value'));
2059 settings
.set('upload_choking_algorithm', $('uploadChokingAlgorithm').getProperty('value'));
2060 settings
.set('enable_super_seeding', $('strictSuperSeeding').getProperty('checked'));
2061 settings
.set('announce_to_all_trackers', $('announceAllTrackers').getProperty('checked'));
2062 settings
.set('announce_to_all_tiers', $('announceAllTiers').getProperty('checked'));
2063 settings
.set('announce_ip', $('announceIP').getProperty('value'));
2066 const json_str
= JSON
.encode(settings
);
2069 url
: 'api/v2/app/setPreferences',
2074 onFailure: function() {
2075 alert("QBT_TR(Unable to save program preferences, qBittorrent is probably unreachable.)QBT_TR[CONTEXT=HttpServer]");
2076 window
.parent
.closeWindows();
2078 onSuccess: function() {
2080 window
.parent
.location
.reload();
2081 window
.parent
.closeWindows();
2086 $('networkInterface').addEvent('change', function() {
2087 updateInterfaceAddresses($(this).getProperty('value'), '');