1 <div id=
"BehaviorTab" class=
"PrefTab">
2 <fieldset class=
"settings">
3 <legend>QBT_TR(Language)QBT_TR[CONTEXT=OptionsDialog]
</legend>
4 <label for=
"locale_select">QBT_TR(User Interface Language:)QBT_TR[CONTEXT=OptionsDialog]
</label>
5 <select id=
"locale_select">
10 <fieldset class=
"settings">
11 <legend>QBT_TR(Action on double-click)QBT_TR[CONTEXT=OptionsDialog]
</legend>
14 <td><label for=
"dblclickDownloadSelect">QBT_TR(Downloading torrents:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
16 <select id=
"dblclickDownloadSelect">
17 <option value=
"1" selected
>QBT_TR(Start / Stop Torrent)QBT_TR[CONTEXT=OptionsDialog]
</option>
18 <option value=
"0">QBT_TR(No action)QBT_TR[CONTEXT=OptionsDialog]
</option>
23 <td><label for=
"dblclickCompleteSelect">QBT_TR(Completed torrents:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
25 <select id=
"dblclickCompleteSelect">
26 <option value=
"1" selected
>QBT_TR(Start / Stop Torrent)QBT_TR[CONTEXT=OptionsDialog]
</option>
27 <option value=
"0">QBT_TR(No action)QBT_TR[CONTEXT=OptionsDialog]
</option>
34 <fieldset class=
"settings">
36 <input type=
"checkbox" id=
"filelog_checkbox" onclick=
"qBittorrent.Preferences.updateFileLogEnabled();" />
37 <label for=
"filelog_checkbox">QBT_TR(Log file)QBT_TR[CONTEXT=OptionsDialog]
</label>
40 <label for=
"filelog_save_path_input">QBT_TR(Save path:)QBT_TR[CONTEXT=OptionsDialog]
</label>
41 <input type=
"text" id=
"filelog_save_path_input" class=
"pathDirectory" />
45 <td><input type=
"checkbox" id=
"filelog_backup_checkbox" onclick=
"qBittorrent.Preferences.updateFileLogBackupEnabled();" /></td>
46 <td><label for=
"filelog_backup_checkbox">QBT_TR(Backup the log file after:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
47 <td><input id=
"filelog_max_size_input" type=
"number" min=
"1" max=
"1024000" value=
"65" onchange=
"qBittorrent.Preferences.numberInputLimiter(this);" />QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
</td>
50 <td><input type=
"checkbox" id=
"filelog_delete_old_checkbox" onclick=
"qBittorrent.Preferences.updateFileLogDeleteEnabled();" /></td>
51 <td><label for=
"filelog_delete_old_checkbox">QBT_TR(Delete backup logs older than:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
53 <input type=
"number" min=
"1" max=
"365" value=
"6" id=
"filelog_age_input" onchange=
"qBittorrent.Preferences.numberInputLimiter(this);" />
54 <select id=
"filelog_age_type_select">
55 <option value=
"0">QBT_TR(days)QBT_TR[CONTEXT=OptionsDialog]
</option>
56 <option value=
"1" selected
>QBT_TR(months)QBT_TR[CONTEXT=OptionsDialog]
</option>
57 <option value=
"2">QBT_TR(years)QBT_TR[CONTEXT=OptionsDialog]
</option>
65 <input type=
"checkbox" id=
"performanceWarning" />
66 <label for=
"performanceWarning">QBT_TR(Log performance warnings)QBT_TR[CONTEXT=OptionsDialog]
</label>
70 <div id=
"DownloadsTab" class=
"PrefTab invisible">
71 <fieldset class=
"settings">
72 <legend>QBT_TR(When adding a torrent)QBT_TR[CONTEXT=OptionsDialog]
</legend>
74 <label for=
"contentlayout_select">QBT_TR(Torrent content layout:)QBT_TR[CONTEXT=OptionsDialog]
</label>
75 <select id=
"contentlayout_select">
76 <option value=
"Original">QBT_TR(Original)QBT_TR[CONTEXT=OptionsDialog]
</option>
77 <option value=
"Subfolder">QBT_TR(Create subfolder)QBT_TR[CONTEXT=OptionsDialog]
</option>
78 <option value=
"NoSubfolder">QBT_TR(Don't create subfolder)QBT_TR[CONTEXT=OptionsDialog]
</option>
82 <input type=
"checkbox" id=
"addToTopOfQueueCheckbox" />
83 <label for=
"addToTopOfQueueCheckbox">QBT_TR(Add to top of queue)QBT_TR[CONTEXT=OptionsDialog]
</label>
86 <input type=
"checkbox" id=
"dontstartdownloads_checkbox" />
87 <label for=
"dontstartdownloads_checkbox">QBT_TR(Do not start the download automatically)QBT_TR[CONTEXT=OptionsDialog]
</label>
90 <label for=
"stopConditionSelect">QBT_TR(Torrent stop condition:)QBT_TR[CONTEXT=OptionsDialog]
</label>
91 <select id=
"stopConditionSelect">
92 <option value=
"None">QBT_TR(None)QBT_TR[CONTEXT=OptionsDialog]
</option>
93 <option value=
"MetadataReceived">QBT_TR(Metadata received)QBT_TR[CONTEXT=OptionsDialog]
</option>
94 <option value=
"FilesChecked">QBT_TR(Files checked)QBT_TR[CONTEXT=OptionsDialog]
</option>
98 <input type=
"checkbox" id=
"deletetorrentfileafter_checkbox" />
99 <label for=
"deletetorrentfileafter_checkbox">QBT_TR(Delete .torrent files afterwards)QBT_TR[CONTEXT=OptionsDialog]
</label>
103 <div class=
"formRow">
104 <input type=
"checkbox" id=
"preallocateall_checkbox" />
105 <label for=
"preallocateall_checkbox">QBT_TR(Pre-allocate disk space for all files)QBT_TR[CONTEXT=OptionsDialog]
</label>
107 <div class=
"formRow">
108 <span id=
"appendexttr">
109 <input type=
"checkbox" id=
"appendext_checkbox" />
110 <label for=
"appendext_checkbox">QBT_TR(Append .!qB extension to incomplete files)QBT_TR[CONTEXT=OptionsDialog]
</label>
113 <div class=
"formRow">
114 <span id=
"unwantedfoldertr">
115 <input type=
"checkbox" id=
"unwantedfolder_checkbox" />
116 <label for=
"unwantedfolder_checkbox">QBT_TR(Keep unselected files in
".unwanted" folder)QBT_TR[CONTEXT=OptionsDialog]
</label>
120 <fieldset class=
"settings">
121 <legend>QBT_TR(Saving Management)QBT_TR[CONTEXT=HttpServer]
</legend>
125 <label>QBT_TR(Default Torrent Management Mode:)QBT_TR[CONTEXT=OptionsDialog]
</label>
128 <select id=
"default_tmm_combobox">
129 <option value=
"false" selected
>QBT_TR(Manual)QBT_TR[CONTEXT=OptionsDialog]
</option>
130 <option value=
"true">QBT_TR(Automatic)QBT_TR[CONTEXT=OptionsDialog]
</option>
136 <label>QBT_TR(When Torrent Category changed:)QBT_TR[CONTEXT=OptionsDialog]
</label>
139 <select id=
"torrent_changed_tmm_combobox">
140 <option value=
"true">QBT_TR(Relocate torrent)QBT_TR[CONTEXT=OptionsDialog]
</option>
141 <option value=
"false" selected
>QBT_TR(Switch torrent to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]
</option>
147 <label>QBT_TR(When Default Save Path changed:)QBT_TR[CONTEXT=OptionsDialog]
</label>
150 <select id=
"save_path_changed_tmm_combobox">
151 <option value=
"true">QBT_TR(Relocate affected torrents)QBT_TR[CONTEXT=OptionsDialog]
</option>
152 <option value=
"false" selected
>QBT_TR(Switch affected torrents to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]
</option>
158 <label>QBT_TR(When Category Save Path changed:)QBT_TR[CONTEXT=OptionsDialog]
</label>
161 <select id=
"category_changed_tmm_combobox">
162 <option value=
"true">QBT_TR(Relocate affected torrents)QBT_TR[CONTEXT=OptionsDialog]
</option>
163 <option value=
"false" selected
>QBT_TR(Switch affected torrents to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]
</option>
168 <div class=
"formRow">
169 <input type=
"checkbox" id=
"use_subcategories_checkbox" />
170 <label for=
"use_subcategories_checkbox">QBT_TR(Use Subcategories)QBT_TR[CONTEXT=OptionsDialog]
</label>
175 <label for=
"savepath_text">QBT_TR(Default Save Path:)QBT_TR[CONTEXT=OptionsDialog]
</label>
178 <input type=
"text" id=
"savepath_text" class=
"pathDirectory" autocorrect=
"off" autocapitalize=
"none" />
183 <input type=
"checkbox" id=
"temppath_checkbox" onclick=
"qBittorrent.Preferences.updateTempDirEnabled();" />
184 <label for=
"temppath_checkbox">QBT_TR(Keep incomplete torrents in:)QBT_TR[CONTEXT=OptionsDialog]
</label>
187 <input type=
"text" id=
"temppath_text" class=
"pathDirectory" autocorrect=
"off" autocapitalize=
"none" />
192 <input type=
"checkbox" id=
"exportdir_checkbox" onclick=
"qBittorrent.Preferences.updateExportDirEnabled();" />
193 <label for=
"exportdir_checkbox">QBT_TR(Copy .torrent files to:)QBT_TR[CONTEXT=OptionsDialog]
</label>
196 <input type=
"text" id=
"exportdir_text" class=
"pathDirectory" autocorrect=
"off" autocapitalize=
"none" />
201 <input type=
"checkbox" id=
"exportdirfin_checkbox" onclick=
"qBittorrent.Preferences.updateExportDirFinEnabled();" />
202 <label for=
"exportdirfin_checkbox">QBT_TR(Copy .torrent files for finished downloads to:)QBT_TR[CONTEXT=OptionsDialog]
</label>
205 <input type=
"text" id=
"exportdirfin_text" class=
"pathDirectory" autocorrect=
"off" autocapitalize=
"none" />
211 <fieldset class=
"settings">
212 <legend>QBT_TR(Automatically add torrents from:)QBT_TR[CONTEXT=OptionsDialog]
</legend>
213 <table id=
"watched_folders_tab" style=
"border: 1px solid black;">
216 <th>QBT_TR(Monitored Folder)QBT_TR[CONTEXT=ScanFoldersModel]
</th>
217 <th>QBT_TR(Override Save Location)QBT_TR[CONTEXT=ScanFoldersModel]
</th>
224 <fieldset class=
"settings">
226 <input type=
"checkbox" id=
"excludedFileNamesCheckbox" onclick=
"qBittorrent.Preferences.updateExcludedFileNamesEnabled();" />
227 <label for=
"excludedFileNamesCheckbox">QBT_TR(Excluded file names)QBT_TR[CONTEXT=OptionsDialog]
</label>
229 <textarea id=
"excludedFileNamesTextarea" rows=
"6" cols=
"70"></textarea>
232 <fieldset class=
"settings">
234 <input type=
"checkbox" id=
"mail_notification_checkbox" onclick=
"qBittorrent.Preferences.updateMailNotification();" />
235 <label for=
"mail_notification_checkbox">QBT_TR(Email notification upon download completion)QBT_TR[CONTEXT=OptionsDialog]
</label>
240 <label for=
"src_email_txt">QBT_TR(From:)QBT_TR[CONTEXT=OptionsDialog]
</label>
243 <input type=
"text" id=
"src_email_txt" />
248 <label for=
"dest_email_txt">QBT_TR(To:)QBT_TR[CONTEXT=OptionsDialog]
</label>
251 <input type=
"text" id=
"dest_email_txt" />
256 <label for=
"smtp_server_txt">QBT_TR(SMTP server:)QBT_TR[CONTEXT=OptionsDialog]
</label>
259 <input type=
"text" id=
"smtp_server_txt" />
263 <div class=
"formRow">
264 <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>
266 <fieldset class=
"settings">
268 <input type=
"checkbox" id=
"mail_auth_checkbox" onclick=
"qBittorrent.Preferences.updateMailAuthSettings();" />
269 <label for=
"mail_auth_checkbox">QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]
</label>
274 <label for=
"mail_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]
</label>
277 <input type=
"text" id=
"mail_username_text" />
282 <label for=
"mail_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]
</label>
285 <input type=
"password" id=
"mail_password_text" />
290 <div class=
"formRow">
291 <input type=
"button" id=
"mail_test_button" value=
"QBT_TR(Send test email)QBT_TR[CONTEXT=OptionsDialog]" onclick=
"qBittorrent.Preferences.sendTestEmail();" />
295 <fieldset class=
"settings">
297 QBT_TR(Run external program)QBT_TR[CONTEXT=OptionsDialog]
299 <div class=
"formRow">
300 <input type=
"checkbox" id=
"autorunOnTorrentAddedCheckbox" onclick=
"qBittorrent.Preferences.updateAutoRunOnTorrentAdded();" />
301 <label for=
"autorunOnTorrentAddedCheckbox">QBT_TR(Run external program on torrent added)QBT_TR[CONTEXT=OptionsDialog]
</label>
302 <input type=
"text" id=
"autorunOnTorrentAddedProgram" style=
"width: 400px;" />
304 <div class=
"formRow">
305 <input type=
"checkbox" id=
"autorun_checkbox" onclick=
"qBittorrent.Preferences.updateAutoRun();" />
306 <label for=
"autorun_checkbox">QBT_TR(Run external program on torrent finished)QBT_TR[CONTEXT=OptionsDialog]
</label>
307 <input type=
"text" id=
"autorunProg_txt" style=
"width: 400px;" />
309 <div style=
"font-style: italic;">QBT_TR(Supported parameters (case sensitive):)QBT_TR[CONTEXT=OptionsDialog]
311 <li>QBT_TR(%N: Torrent name)QBT_TR[CONTEXT=OptionsDialog]
</li>
312 <li>QBT_TR(%L: Category)QBT_TR[CONTEXT=OptionsDialog]
</li>
313 <li>QBT_TR(%G: Tags (separated by comma))QBT_TR[CONTEXT=OptionsDialog]
</li>
314 <li>QBT_TR(%F: Content path (same as root path for multifile torrent))QBT_TR[CONTEXT=OptionsDialog]
</li>
315 <li>QBT_TR(%R: Root path (first torrent subdirectory path))QBT_TR[CONTEXT=OptionsDialog]
</li>
316 <li>QBT_TR(%D: Save path)QBT_TR[CONTEXT=OptionsDialog]
</li>
317 <li>QBT_TR(%C: Number of files)QBT_TR[CONTEXT=OptionsDialog]
</li>
318 <li>QBT_TR(%Z: Torrent size (bytes))QBT_TR[CONTEXT=OptionsDialog]
</li>
319 <li>QBT_TR(%T: Current tracker)QBT_TR[CONTEXT=OptionsDialog]
</li>
320 <li>QBT_TR(%I: Info hash v1)QBT_TR[CONTEXT=OptionsDialog]
</li>
321 <li>QBT_TR(%J: Info hash v2)QBT_TR[CONTEXT=OptionsDialog]
</li>
322 <li>QBT_TR(%K: Torrent ID)QBT_TR[CONTEXT=OptionsDialog]
</li>
324 QBT_TR(Tip: Encapsulate parameter with quotation marks to avoid text being cut off at whitespace (e.g.,
"%N"))QBT_TR[CONTEXT=OptionsDialog]
329 <div id=
"ConnectionTab" class=
"PrefTab invisible">
330 <div class=
"formRow">
331 <label>QBT_TR(Peer connection protocol:)QBT_TR[CONTEXT=OptionsDialog]
</label>
332 <select id=
"enable_protocol_combobox">
333 <option value=
"0" selected
>QBT_TR(TCP and μTP)QBT_TR[CONTEXT=OptionsDialog]
</option>
334 <option value=
"1">TCP
</option>
335 <option value=
"2">μTP
</option>
338 <fieldset class=
"settings">
339 <legend>QBT_TR(Listening Port)QBT_TR[CONTEXT=OptionsDialog]
</legend>
340 <div class=
"formRow">
341 <label for=
"port_value">QBT_TR(Port used for incoming connections:)QBT_TR[CONTEXT=OptionsDialog]
</label>
342 <input type=
"text" id=
"port_value" style=
"width: 4em;" title=
"QBT_TR(Set to 0 to let your system pick an unused port)QBT_TR[CONTEXT=OptionsDialog]" />
343 <button type=
"button" style=
"margin-left: 1em;" onclick=
"qBittorrent.Preferences.generateRandomPort();">QBT_TR(Random)QBT_TR[CONTEXT=OptionsDialog]
</button>
345 <div class=
"formRow">
346 <input type=
"checkbox" id=
"upnp_checkbox" />
347 <label for=
"upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP port forwarding from my router)QBT_TR[CONTEXT=OptionsDialog]
</label>
351 <fieldset class=
"settings">
352 <legend>QBT_TR(Connections Limits)QBT_TR[CONTEXT=OptionsDialog]
</legend>
356 <input type=
"checkbox" id=
"max_connec_checkbox" onclick=
"qBittorrent.Preferences.updateMaxConnecEnabled();" />
357 <label for=
"max_connec_checkbox">QBT_TR(Global maximum number of connections:)QBT_TR[CONTEXT=OptionsDialog]
</label>
359 <td><input type=
"text" id=
"max_connec_value" style=
"width: 4em;" /></td>
363 <input type=
"checkbox" id=
"max_connec_per_torrent_checkbox" onclick=
"qBittorrent.Preferences.updateMaxConnecPerTorrentEnabled();" />
364 <label for=
"max_connec_per_torrent_checkbox">QBT_TR(Maximum number of connections per torrent:)QBT_TR[CONTEXT=OptionsDialog]
</label>
366 <td><input type=
"text" id=
"max_connec_per_torrent_value" style=
"width: 4em;" /></td>
370 <input type=
"checkbox" id=
"max_uploads_checkbox" onclick=
"qBittorrent.Preferences.updateMaxUploadsEnabled();" />
371 <label for=
"max_uploads_checkbox">QBT_TR(Global maximum number of upload slots:)QBT_TR[CONTEXT=OptionsDialog]
</label>
373 <td><input type=
"text" id=
"max_uploads_value" style=
"width: 4em;" /></td>
377 <input type=
"checkbox" id=
"max_uploads_per_torrent_checkbox" onclick=
"qBittorrent.Preferences.updateMaxUploadsPerTorrentEnabled();" />
378 <label for=
"max_uploads_per_torrent_checkbox">QBT_TR(Maximum number of upload slots per torrent:)QBT_TR[CONTEXT=OptionsDialog]
</label>
380 <td><input type=
"text" id=
"max_uploads_per_torrent_value" style=
"width: 4em;" /></td>
385 <fieldset class=
"settings" id=
"fieldsetI2p">
387 <input type=
"checkbox" id=
"i2pEnabledCheckbox" onclick=
"qBittorrent.Preferences.updateI2PSettingsEnabled();" />
388 <label for=
"i2pEnabledCheckbox">QBT_TR(I2P (Experimental))QBT_TR[CONTEXT=OptionsDialog]
</label>
393 <label for=
"i2pAddress">QBT_TR(Host:)QBT_TR[CONTEXT=OptionsDialog]
</label>
396 <input type=
"text" id=
"i2pAddress" />
399 <label for=
"i2pPort">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]
</label>
402 <input type=
"number" id=
"i2pPort" min=
"0" max=
"65535" onchange=
"qBittorrent.Preferences.numberInputLimiter(this);" style=
"width: 5em;" />
406 <div class=
"formRow">
407 <input type=
"checkbox" id=
"i2pMixedMode" title=
"QBT_TR(If "mixed mode" is enabled, I2P torrents are allowed to also get peers from other sources than the tracker, and connect to regular IPs, not providing any anonymization. This may be useful if the user is not interested in the anonymization of I2P, but still wants to be able to connect to I2P peers.)QBT_TR[CONTEXT=OptionsDialog]" />
408 <label for=
"i2pMixedMode">QBT_TR(Mixed mode)QBT_TR[CONTEXT=OptionsDialog]
</label>
412 <fieldset class=
"settings">
413 <legend>QBT_TR(Proxy Server)QBT_TR[CONTEXT=OptionsDialog]
</legend>
417 <label for=
"peer_proxy_type_select">QBT_TR(Type:)QBT_TR[CONTEXT=OptionsDialog]
</label>
420 <select id=
"peer_proxy_type_select" onchange=
"qBittorrent.Preferences.updatePeerProxySettings();">
421 <option value=
"None">QBT_TR((None))QBT_TR[CONTEXT=OptionsDialog]
</option>
422 <option value=
"SOCKS4">QBT_TR(SOCKS4)QBT_TR[CONTEXT=OptionsDialog]
</option>
423 <option value=
"SOCKS5">QBT_TR(SOCKS5)QBT_TR[CONTEXT=OptionsDialog]
</option>
424 <option value=
"HTTP">QBT_TR(HTTP)QBT_TR[CONTEXT=OptionsDialog]
</option>
428 <label for=
"peer_proxy_host_text">QBT_TR(Host:)QBT_TR[CONTEXT=OptionsDialog]
</label>
431 <input type=
"text" id=
"peer_proxy_host_text" />
434 <label for=
"peer_proxy_port_value">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]
</label>
437 <input type=
"text" id=
"peer_proxy_port_value" style=
"width: 4em;" />
442 <div class=
"formRow">
443 <input type=
"checkbox" id=
"proxyHostnameLookupCheckbox" title=
"QBT_TR(If checked, hostname lookups are done via the proxy.)QBT_TR[CONTEXT=OptionsDialog]" />
444 <label for=
"proxyHostnameLookupCheckbox">QBT_TR(Perform hostname lookup via proxy)QBT_TR[CONTEXT=OptionsDialog]
</label>
447 <fieldset class=
"settings">
449 <input type=
"checkbox" id=
"peer_proxy_auth_checkbox" onclick=
"qBittorrent.Preferences.updatePeerProxyAuthSettings();" />
450 <label for=
"peer_proxy_auth_checkbox">QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]
</label>
455 <label for=
"peer_proxy_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]
</label>
458 <input type=
"text" id=
"peer_proxy_username_text" />
463 <label for=
"peer_proxy_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]
</label>
466 <input type=
"password" id=
"peer_proxy_password_text" />
470 <div class=
"formRow">
471 <span>QBT_TR(Info: The password is saved unencrypted)QBT_TR[CONTEXT=OptionsDialog]
</span>
475 <fieldset class=
"settings">
477 <input type=
"checkbox" id=
"proxy_bittorrent_checkbox" onclick=
"qBittorrent.Preferences.updatePeerProxySettings();" />
478 <label for=
"proxy_bittorrent_checkbox">QBT_TR(Use proxy for BitTorrent purposes)QBT_TR[CONTEXT=OptionsDialog]
</label>
480 <div class=
"formRow">
481 <input type=
"checkbox" id=
"use_peer_proxy_checkbox" />
482 <label for=
"use_peer_proxy_checkbox">QBT_TR(Use proxy for peer connections)QBT_TR[CONTEXT=OptionsDialog]
</label>
485 <div class=
"formRow">
486 <input type=
"checkbox" id=
"proxy_rss_checkbox" />
487 <label for=
"proxy_rss_checkbox">QBT_TR(Use proxy for RSS purposes)QBT_TR[CONTEXT=OptionsDialog]
</label>
489 <div class=
"formRow">
490 <input type=
"checkbox" id=
"proxy_misc_checkbox" />
491 <label for=
"proxy_misc_checkbox">QBT_TR(Use proxy for general purposes)QBT_TR[CONTEXT=OptionsDialog]
</label>
495 <fieldset class=
"settings">
497 <label>QBT_TR(IP Filtering)QBT_TR[CONTEXT=OptionsDialog]
</label>
499 <div class=
"formRow">
500 <input type=
"checkbox" id=
"ipfilter_text_checkbox" onclick=
"qBittorrent.Preferences.updateFilterSettings();" />
501 <label for=
"ipfilter_text_checkbox">QBT_TR(Filter path (.dat, .p2p, .p2b):)QBT_TR[CONTEXT=OptionsDialog]
</label>
502 <input type=
"text" id=
"ipfilter_text" />
504 <div class=
"formRow">
505 <input type=
"checkbox" id=
"ipfilter_trackers_checkbox" />
506 <label for=
"ipfilter_trackers_checkbox">QBT_TR(Apply to trackers)QBT_TR[CONTEXT=OptionsDialog]
</label>
508 <div class=
"formRow">
509 <fieldset class=
"settings">
510 <legend>QBT_TR(Manually banned IP addresses...)QBT_TR[CONTEXT=OptionsDialog]
</legend>
511 <textarea id=
"banned_IPs_textarea" rows=
"5" cols=
"70"></textarea>
517 <div id=
"SpeedTab" class=
"PrefTab invisible">
518 <fieldset class=
"settings">
519 <legend>QBT_TR(Global Rate Limits)QBT_TR[CONTEXT=OptionsDialog]
</legend>
523 <img src=
"images/slow_off.svg" style=
"height: 1.5em;" alt=
"QBT_TR(Alternative speed limits)QBT_TR[CONTEXT=MainWindow]">
525 <td><label for=
"up_limit_value">QBT_TR(Upload:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
526 <td><input type=
"number" id=
"up_limit_value" style=
"width: 4em;" min=
"0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
</td>
529 <td><label for=
"dl_limit_value">QBT_TR(Download:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
530 <td><input type=
"number" id=
"dl_limit_value" style=
"width: 4em;" min=
"0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
</td>
533 <i>QBT_TR(
0 means unlimited)QBT_TR[CONTEXT=OptionsDialog]
</i>
536 <fieldset class=
"settings">
537 <legend>QBT_TR(Alternative Rate Limits)QBT_TR[CONTEXT=OptionsDialog]
</legend>
541 <img src=
"images/slow.svg" style=
"height: 1.5em;" alt=
"QBT_TR(Alternative speed limits)QBT_TR[CONTEXT=MainWindow]">
543 <td><label for=
"alt_up_limit_value">QBT_TR(Upload:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
544 <td><input type=
"number" id=
"alt_up_limit_value" style=
"width: 4em;" min=
"0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
</td>
547 <td><label for=
"alt_dl_limit_value">QBT_TR(Download:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
548 <td><input type=
"number" id=
"alt_dl_limit_value" style=
"width: 4em;" min=
"0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
</td>
551 <i>QBT_TR(
0 means unlimited)QBT_TR[CONTEXT=OptionsDialog]
</i>
553 <fieldset class=
"settings">
555 <input type=
"checkbox" id=
"limitSchedulingCheckbox" onclick=
"qBittorrent.Preferences.updateSchedulingEnabled();" />
556 <label for=
"limitSchedulingCheckbox">QBT_TR(Schedule the use of alternative rate limits)QBT_TR[CONTEXT=OptionsDialog]
</label>
558 <div class=
"formRow">
559 QBT_TR(From:)QBT_TR[CONTEXT=OptionsDialog]
560 <input type=
"text" id=
"schedule_from_hour" style=
"width: 1.5em;" />:
<input type=
"text" id=
"schedule_from_min" style=
"width: 1.5em;" />
561 QBT_TR(To:)QBT_TR[CONTEXT=OptionsDialog]
562 <input type=
"text" id=
"schedule_to_hour" style=
"width: 1.5em;" />:
<input type=
"text" id=
"schedule_to_min" style=
"width: 1.5em;" />
564 <div class=
"formRow">
565 QBT_TR(When:)QBT_TR[CONTEXT=OptionsDialog]
566 <select id=
"schedule_freq_select">
567 <option value=
"0">QBT_TR(Every day)QBT_TR[CONTEXT=OptionsDialog]
</option>
568 <option value=
"1">QBT_TR(Weekdays)QBT_TR[CONTEXT=OptionsDialog]
</option>
569 <option value=
"2">QBT_TR(Weekends)QBT_TR[CONTEXT=OptionsDialog]
</option>
570 <option value=
"3">QBT_TR(Monday)QBT_TR[CONTEXT=HttpServer]
</option>
571 <option value=
"4">QBT_TR(Tuesday)QBT_TR[CONTEXT=HttpServer]
</option>
572 <option value=
"5">QBT_TR(Wednesday)QBT_TR[CONTEXT=HttpServer]
</option>
573 <option value=
"6">QBT_TR(Thursday)QBT_TR[CONTEXT=HttpServer]
</option>
574 <option value=
"7">QBT_TR(Friday)QBT_TR[CONTEXT=HttpServer]
</option>
575 <option value=
"8">QBT_TR(Saturday)QBT_TR[CONTEXT=HttpServer]
</option>
576 <option value=
"9">QBT_TR(Sunday)QBT_TR[CONTEXT=HttpServer]
</option>
582 <fieldset class=
"settings">
583 <legend>QBT_TR(Rate Limits Settings)QBT_TR[CONTEXT=OptionsDialog]
</legend>
584 <div class=
"formRow">
585 <input type=
"checkbox" id=
"limit_utp_rate_checkbox" />
586 <label for=
"limit_utp_rate_checkbox">QBT_TR(Apply rate limit to µTP protocol)QBT_TR[CONTEXT=OptionsDialog]
</label>
588 <div class=
"formRow">
589 <input type=
"checkbox" id=
"limit_tcp_overhead_checkbox" />
590 <label for=
"limit_tcp_overhead_checkbox">QBT_TR(Apply rate limit to transport overhead)QBT_TR[CONTEXT=OptionsDialog]
</label>
592 <div class=
"formRow">
593 <input type=
"checkbox" id=
"limit_lan_peers_checkbox" />
594 <label for=
"limit_lan_peers_checkbox">QBT_TR(Apply rate limit to peers on LAN)QBT_TR[CONTEXT=OptionsDialog]
</label>
599 <div id=
"BittorrentTab" class=
"PrefTab invisible">
600 <fieldset class=
"settings">
601 <legend>QBT_TR(Privacy)QBT_TR[CONTEXT=OptionsDialog]
</legend>
602 <div class=
"formRow">
603 <input type=
"checkbox" id=
"dht_checkbox" />
604 <label for=
"dht_checkbox">QBT_TR(Enable DHT (decentralized network) to find more peers)QBT_TR[CONTEXT=OptionsDialog]
</label>
606 <div class=
"formRow">
607 <input type=
"checkbox" id=
"pex_checkbox" />
608 <label for=
"pex_checkbox">QBT_TR(Enable Peer Exchange (PeX) to find more peers)QBT_TR[CONTEXT=OptionsDialog]
</label>
610 <div class=
"formRow">
611 <input type=
"checkbox" id=
"lsd_checkbox" />
612 <label for=
"lsd_checkbox">QBT_TR(Enable Local Peer Discovery to find more peers)QBT_TR[CONTEXT=OptionsDialog]
</label>
614 <div class=
"formRow">
615 <label for=
"encryption_select">QBT_TR(Encryption mode:)QBT_TR[CONTEXT=OptionsDialog]
</label>
616 <select id=
"encryption_select">
617 <option value=
"0">QBT_TR(Allow encryption)QBT_TR[CONTEXT=OptionsDialog]
</option>
618 <option value=
"1">QBT_TR(Require encryption)QBT_TR[CONTEXT=OptionsDialog]
</option>
619 <option value=
"2">QBT_TR(Disable encryption)QBT_TR[CONTEXT=OptionsDialog]
</option>
622 <div class=
"formRow">
623 <input type=
"checkbox" id=
"anonymous_mode_checkbox" />
624 <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>
628 <div class=
"formRow">
629 <label for=
"maxActiveCheckingTorrents">QBT_TR(Max active checking torrents:)QBT_TR[CONTEXT=OptionsDialog]
</label>
630 <input type=
"number" id=
"maxActiveCheckingTorrents" style=
"width: 4em;" min=
"-1" />
633 <fieldset class=
"settings">
635 <input type=
"checkbox" id=
"queueing_checkbox" onclick=
"qBittorrent.Preferences.updateQueueingSystem();" />
636 <label for=
"queueing_checkbox">QBT_TR(Torrent Queueing)QBT_TR[CONTEXT=OptionsDialog]
</label>
641 <label for=
"max_active_dl_value">QBT_TR(Maximum active downloads:)QBT_TR[CONTEXT=OptionsDialog]
</label>
644 <input type=
"text" id=
"max_active_dl_value" style=
"width: 4em;" />
649 <label for=
"max_active_up_value">QBT_TR(Maximum active uploads:)QBT_TR[CONTEXT=OptionsDialog]
</label>
652 <input type=
"text" id=
"max_active_up_value" style=
"width: 4em;" />
657 <label for=
"max_active_to_value">QBT_TR(Maximum active torrents:)QBT_TR[CONTEXT=OptionsDialog]
</label>
660 <input type=
"text" id=
"max_active_to_value" style=
"width: 4em;" />
664 <fieldset class=
"settings">
666 <input type=
"checkbox" id=
"dont_count_slow_torrents_checkbox" onclick=
"qBittorrent.Preferences.updateSlowTorrentsSettings();" />
667 <label for=
"dont_count_slow_torrents_checkbox">QBT_TR(Do not count slow torrents in these limits)QBT_TR[CONTEXT=OptionsDialog]
</label>
672 <label for=
"dl_rate_threshold">QBT_TR(Download rate threshold:)QBT_TR[CONTEXT=OptionsDialog]
</label>
675 <input type=
"text" id=
"dl_rate_threshold" style=
"width: 4em;" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
680 <label for=
"ul_rate_threshold">QBT_TR(Upload rate threshold:)QBT_TR[CONTEXT=OptionsDialog]
</label>
683 <input type=
"text" id=
"ul_rate_threshold" style=
"width: 4em;" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
688 <label for=
"torrent_inactive_timer">QBT_TR(Torrent inactivity timer:)QBT_TR[CONTEXT=OptionsDialog]
</label>
691 <input type=
"text" id=
"torrent_inactive_timer" style=
"width: 4em;" /> QBT_TR(seconds)QBT_TR[CONTEXT=OptionsDialog]
698 <fieldset class=
"settings">
699 <legend>QBT_TR(Seeding Limits)QBT_TR[CONTEXT=OptionsDialog]
</legend>
703 <input type=
"checkbox" id=
"max_ratio_checkbox" onclick=
"qBittorrent.Preferences.updateMaxRatioTimeEnabled();" />
704 <label for=
"max_ratio_checkbox">QBT_TR(When ratio reaches)QBT_TR[CONTEXT=OptionsDialog]
</label>
707 <input type=
"text" id=
"max_ratio_value" style=
"width: 4em;" />
712 <input type=
"checkbox" id=
"max_seeding_time_checkbox" onclick=
"qBittorrent.Preferences.updateMaxRatioTimeEnabled();" />
713 <label for=
"max_seeding_time_checkbox">QBT_TR(When total seeding time reaches)QBT_TR[CONTEXT=OptionsDialog]
</label>
716 <input type=
"text" id=
"max_seeding_time_value" style=
"width: 4em;" />QBT_TR(minutes)QBT_TR[CONTEXT=OptionsDialog]
721 <input type=
"checkbox" id=
"max_inactive_seeding_time_checkbox" onclick=
"qBittorrent.Preferences.updateMaxRatioTimeEnabled();" />
722 <label for=
"max_inactive_seeding_time_checkbox">QBT_TR(When inactive seeding time reaches)QBT_TR[CONTEXT=OptionsDialog]
</label>
725 <input type=
"text" id=
"max_inactive_seeding_time_value" style=
"width: 4em;" />QBT_TR(minutes)QBT_TR[CONTEXT=OptionsDialog]
729 <td style=
"text-align: right;"><label for=
"max_ratio_act">QBT_TR(then)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
731 <select id=
"max_ratio_act">
732 <option value=
"0">QBT_TR(Stop torrent)QBT_TR[CONTEXT=OptionsDialog]
</option>
733 <option value=
"1">QBT_TR(Remove torrent)QBT_TR[CONTEXT=OptionsDialog]
</option>
734 <option value=
"3">QBT_TR(Remove torrent and its files)QBT_TR[CONTEXT=OptionsDialog]
</option>
735 <option value=
"2">QBT_TR(Enable super seeding for torrent)QBT_TR[CONTEXT=OptionsDialog]
</option>
742 <fieldset class=
"settings">
744 <input type=
"checkbox" id=
"add_trackers_checkbox" onclick=
"qBittorrent.Preferences.updateAddTrackersEnabled();" />
745 <label for=
"add_trackers_checkbox">QBT_TR(Automatically append these trackers to new downloads:)QBT_TR[CONTEXT=OptionsDialog]
</label>
747 <textarea id=
"add_trackers_textarea" rows=
"5" cols=
"70"></textarea>
751 <div id=
"RSSTab" class=
"PrefTab invisible">
752 <fieldset class=
"settings">
753 <legend>QBT_TR(RSS Reader)QBT_TR[CONTEXT=OptionsDialog]
</legend>
754 <div class=
"formRow">
755 <input type=
"checkbox" id=
"enable_fetching_rss_feeds_checkbox" />
756 <label for=
"enable_fetching_rss_feeds_checkbox">QBT_TR(Enable fetching RSS feeds)QBT_TR[CONTEXT=OptionsDialog]
</label>
761 <label for=
"feed_refresh_interval">QBT_TR(Feeds refresh interval:)QBT_TR[CONTEXT=OptionsDialog]
</label>
764 <input type=
"text" id=
"feed_refresh_interval" style=
"width: 4em;" /> QBT_TR( min)QBT_TR[CONTEXT=OptionsDialog]
769 <label for=
"feedFetchDelay">QBT_TR(Same host request delay:)QBT_TR[CONTEXT=OptionsDialog]
</label>
772 <input type=
"text" id=
"feedFetchDelay" style=
"width: 4em;" /> QBT_TR( sec)QBT_TR[CONTEXT=OptionsDialog]
777 <label for=
"maximum_article_number">QBT_TR(Maximum number of articles per feed:)QBT_TR[CONTEXT=OptionsDialog]
</label>
780 <input type=
"text" id=
"maximum_article_number" style=
"width: 4em;" />
786 <fieldset class=
"settings">
787 <legend>QBT_TR(RSS Torrent Auto Downloader)QBT_TR[CONTEXT=OptionsDialog]
</legend>
788 <div class=
"formRow">
789 <input type=
"checkbox" id=
"enable_auto_downloading_rss_torrents_checkbox" />
790 <label for=
"enable_auto_downloading_rss_torrents_checkbox">QBT_TR(Enable auto downloading of RSS torrents)QBT_TR[CONTEXT=OptionsDialog]
</label>
792 <button type=
"button" style=
"margin: 0 1em; width: calc(100% - 2.2em)" onclick=
"window.qBittorrent.Rss.openRssDownloader();">QBT_TR(Edit auto downloading rules...)QBT_TR[CONTEXT=OptionsDialog]
</button>
795 <fieldset class=
"settings">
796 <legend>QBT_TR(RSS Smart Episode Filter)QBT_TR[CONTEXT=OptionsDialog]
</legend>
797 <div class=
"formRow">
798 <input type=
"checkbox" id=
"downlock_repack_proper_episodes" />
800 <label for=
"downlock_repack_proper_episodes">QBT_TR(Download REPACK/PROPER episodes)QBT_TR[CONTEXT=OptionsDialog]
</label>
802 <label for=
"rss_filter_textarea">QBT_TR(Filters:)QBT_TR[CONTEXT=OptionsDialog]
</label><br>
803 <textarea id=
"rss_filter_textarea" rows=
"6" cols=
"70"></textarea>
807 <div id=
"WebUITab" class=
"PrefTab invisible">
808 <fieldset class=
"settings">
809 <legend>QBT_TR(Web User Interface (Remote control))QBT_TR[CONTEXT=OptionsDialog]
</legend>
813 <label for=
"webui_address_value">QBT_TR(IP address:)QBT_TR[CONTEXT=OptionsDialog]
</label>
816 <input type=
"text" id=
"webui_address_value" />
817 <label for=
"webui_port_value" style=
"margin-left: 10px;">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]
</label>
818 <input type=
"text" id=
"webui_port_value" style=
"width: 4em;" />
822 <div class=
"formRow">
823 <input type=
"checkbox" id=
"webui_upnp_checkbox" />
824 <label for=
"webui_upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP to forward the port from my router)QBT_TR[CONTEXT=OptionsDialog]
</label>
826 <fieldset class=
"settings">
828 <input type=
"checkbox" id=
"use_https_checkbox" onclick=
"qBittorrent.Preferences.updateHttpsSettings();" />
829 <label for=
"use_https_checkbox">QBT_TR(Use HTTPS instead of HTTP)QBT_TR[CONTEXT=OptionsDialog]
</label>
834 <label for=
"ssl_cert_text">QBT_TR(Certificate:)QBT_TR[CONTEXT=OptionsDialog]
</label>
837 <input type=
"text" id=
"ssl_cert_text" class=
"pathFile" style=
"width: 30em;" />
842 <label for=
"ssl_key_text">QBT_TR(Key:)QBT_TR[CONTEXT=OptionsDialog]
</label>
845 <input type=
"text" id=
"ssl_key_text" class=
"pathFile" style=
"width: 30em;" />
849 <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>
852 <fieldset class=
"settings">
853 <legend>QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]
</legend>
857 <label for=
"webui_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]
</label>
860 <input type=
"text" id=
"webui_username_text" />
865 <label for=
"webui_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]
</label>
868 <input type=
"password" id=
"webui_password_text" placeholder=
"QBT_TR(Change current password)QBT_TR[CONTEXT=OptionsDialog]" autocomplete=
"new-password" />
872 <div class=
"formRow">
873 <input type=
"checkbox" id=
"bypass_local_auth_checkbox" />
874 <label for=
"bypass_local_auth_checkbox">QBT_TR(Bypass authentication for clients on localhost)QBT_TR[CONTEXT=OptionsDialog]
</label>
876 <div class=
"formRow">
877 <input type=
"checkbox" id=
"bypass_auth_subnet_whitelist_checkbox" onclick=
"qBittorrent.Preferences.updateBypasssAuthSettings();" />
878 <label for=
"bypass_auth_subnet_whitelist_checkbox">QBT_TR(Bypass authentication for clients in whitelisted IP subnets)QBT_TR[CONTEXT=OptionsDialog]
</label>
880 <div class=
"formRow" style=
"padding-left: 30px; padding-top: 5px;">
881 <textarea id=
"bypass_auth_subnet_whitelist_textarea" rows=
"5" cols=
"48" placeholder=
"QBT_TR(Example: 172.17.32.0/24, fdff:ffff:c8::/40)QBT_TR[CONTEXT=OptionsDialog]"></textarea>
885 <td><label for=
"webUIMaxAuthFailCountInput">QBT_TR(Ban client after consecutive failures:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
886 <td><input type=
"number" id=
"webUIMaxAuthFailCountInput" style=
"width: 4em;" min=
"0" /></td>
889 <td style=
"text-align: right;"><label for=
"webUIBanDurationInput">QBT_TR(ban for:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
890 <td><input type=
"number" id=
"webUIBanDurationInput" style=
"width: 4em;" min=
"1" />QBT_TR(seconds)QBT_TR[CONTEXT=OptionsDialog]
</td>
895 <td><label for=
"webUISessionTimeoutInput">QBT_TR(Session timeout:)QBT_TR[CONTEXT=OptionsDialog]
</label></td>
896 <td><input type=
"number" id=
"webUISessionTimeoutInput" style=
"width: 4em;" min=
"0" /> QBT_TR(seconds)QBT_TR[CONTEXT=OptionsDialog]
</td>
901 <fieldset class=
"settings">
902 <legend><input type=
"checkbox" id=
"use_alt_webui_checkbox" onclick=
"qBittorrent.Preferences.updateAlternativeWebUISettings();" />
903 <label for=
"use_alt_webui_checkbox">QBT_TR(Use alternative WebUI)QBT_TR[CONTEXT=OptionsDialog]
</label>
905 <div class=
"formRow">
906 <label for=
"webui_files_location_textarea">QBT_TR(Files location:)QBT_TR[CONTEXT=OptionsDialog]
</label>
907 <input type=
"text" id=
"webui_files_location_textarea" class=
"pathDirectory" />
911 <fieldset class=
"settings">
912 <legend>QBT_TR(Security)QBT_TR[CONTEXT=OptionsDialog]
</legend>
913 <div class=
"formRow">
914 <input type=
"checkbox" id=
"clickjacking_protection_checkbox" />
915 <label for=
"clickjacking_protection_checkbox">QBT_TR(Enable clickjacking protection)QBT_TR[CONTEXT=OptionsDialog]
</label>
917 <div class=
"formRow">
918 <input type=
"checkbox" id=
"csrf_protection_checkbox" />
919 <label for=
"csrf_protection_checkbox">QBT_TR(Enable Cross-Site Request Forgery (CSRF) protection)QBT_TR[CONTEXT=OptionsDialog]
</label>
921 <div class=
"formRow">
922 <input type=
"checkbox" id=
"secureCookieCheckbox" />
923 <label for=
"secureCookieCheckbox">QBT_TR(Enable cookie Secure flag (requires HTTPS))QBT_TR[CONTEXT=OptionsDialog]
</label>
926 <fieldset class=
"settings">
928 <input type=
"checkbox" id=
"host_header_validation_checkbox" onclick=
"qBittorrent.Preferences.updateHostHeaderValidationSettings();" />
929 <label for=
"host_header_validation_checkbox">QBT_TR(Enable Host header validation)QBT_TR[CONTEXT=OptionsDialog]
</label>
934 <label for=
"webui_domain_textarea">QBT_TR(Server domains:)QBT_TR[CONTEXT=OptionsDialog]
</label>
937 <textarea id=
"webui_domain_textarea" rows=
"1" cols=
"60" title=
"QBT_TR(Whitelist for filtering HTTP Host header values.
938 In order to defend against DNS rebinding attack,
939 you should put in domain names used by WebUI server.
941 Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsDialog]"></textarea>
948 <fieldset class=
"settings">
950 <input type=
"checkbox" id=
"webUIUseCustomHTTPHeadersCheckbox" onclick=
"qBittorrent.Preferences.updateWebUICustomHTTPHeadersSettings();" />
951 <label for=
"webUIUseCustomHTTPHeadersCheckbox">QBT_TR(Add custom HTTP headers)QBT_TR[CONTEXT=OptionsDialog]
</label>
953 <textarea id=
"webUICustomHTTPHeadersTextarea" placeholder=
"QBT_TR(Header: value pairs, one per line)QBT_TR[CONTEXT=OptionsDialog]" style=
"width: 90%;"></textarea>
956 <fieldset class=
"settings">
958 <input type=
"checkbox" id=
"webUIReverseProxySupportCheckbox" onclick=
"qBittorrent.Preferences.updateWebUIReverseProxySettings();" />
959 <label for=
"webUIReverseProxySupportCheckbox">QBT_TR(Enable reverse proxy support)QBT_TR[CONTEXT=OptionsDialog]
</label>
961 <div class=
"formRow">
962 <label for=
"webUIReverseProxiesListTextarea">QBT_TR(Trusted proxies list:)QBT_TR[CONTEXT=OptionsDialog]
</label>
963 <input type=
"text" id=
"webUIReverseProxiesListTextarea" title=
"QBT_TR(Specify reverse proxy IPs (or subnets, e.g. 0.0.0.0/24) in order to use forwarded client address (X-Forwarded-For header). Use ';' to split multiple entries.)QBT_TR[CONTEXT=OptionsDialog]" />
969 <fieldset class=
"settings">
971 <input type=
"checkbox" id=
"use_dyndns_checkbox" onclick=
"qBittorrent.Preferences.updateDynDnsSettings();" />
972 <label for=
"use_dyndns_checkbox">QBT_TR(Update my dynamic domain name)QBT_TR[CONTEXT=OptionsDialog]
</label>
974 <select id=
"dyndns_select">
975 <option value=
"0">DynDNS
</option>
976 <option value=
"1">NO-IP
</option>
978 <input type=
"button" value=
"QBT_TR(Register)QBT_TR[CONTEXT=OptionsDialog]" onclick=
"qBittorrent.Preferences.registerDynDns();" />
979 <table style=
"margin-top: 10px;">
982 <label for=
"dyndns_domain_text">QBT_TR(Domain name:)QBT_TR[CONTEXT=OptionsDialog]
</label>
985 <input type=
"text" id=
"dyndns_domain_text" />
990 <label for=
"dyndns_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]
</label>
993 <input type=
"text" id=
"dyndns_username_text" />
998 <label for=
"dyndns_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1001 <input type=
"password" id=
"dyndns_password_text" />
1008 <div id=
"AdvancedTab" class=
"PrefTab invisible">
1009 <fieldset class=
"settings">
1010 <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>
1014 <label for=
"resumeDataStorageType">QBT_TR(Resume data storage type (requires restart):)QBT_TR[CONTEXT=OptionsDialog]
</label>
1017 <select id=
"resumeDataStorageType" style=
"width: 15em;">
1018 <option value=
"Legacy">QBT_TR(Fastresume files)QBT_TR[CONTEXT=OptionsDialog]
</option>
1019 <option value=
"SQLite">QBT_TR(SQLite database (experimental))QBT_TR[CONTEXT=OptionsDialog]
</option>
1023 <tr id=
"rowMemoryWorkingSetLimit">
1025 <label for=
"torrentContentRemoveOption">QBT_TR(Torrent content removing mode:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1028 <select id=
"torrentContentRemoveOption" style=
"width: 15em;">
1029 <option value=
"Delete">QBT_TR(Delete files permanently)QBT_TR[CONTEXT=OptionsDialog]
</option>
1030 <option value=
"MoveToTrash">QBT_TR(Move files to trash (if possible))QBT_TR[CONTEXT=OptionsDialog]
</option>
1036 <label for=
"memoryWorkingSetLimit">QBT_TR(Physical memory (RAM) usage limit:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://wikipedia.org/wiki/Working_set" target=
"_blank">(?)
</a></label>
1039 <input type=
"text" id=
"memoryWorkingSetLimit" style=
"width: 15em;" title=
"QBT_TR(This option is less effective on Linux)QBT_TR[CONTEXT=OptionsDialog]"> QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
1044 <label for=
"networkInterface">QBT_TR(Network interface:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1047 <select id=
"networkInterface" style=
"width: 15em;">
1053 <label for=
"optionalIPAddressToBind">QBT_TR(Optional IP address to bind to:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1056 <select id=
"optionalIPAddressToBind" style=
"width: 15em;">
1062 <label for=
"saveResumeDataInterval">QBT_TR(Save resume data interval:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1065 <input type=
"text" id=
"saveResumeDataInterval" style=
"width: 15em;"> QBT_TR(min)QBT_TR[CONTEXT=OptionsDialog]
1070 <label for=
"torrentFileSizeLimit">QBT_TR(.torrent file size limit:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1073 <input type=
"text" id=
"torrentFileSizeLimit" style=
"width: 15em;"> QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
1078 <label for=
"recheckTorrentsOnCompletion">QBT_TR(Recheck torrents on completion:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1081 <input type=
"checkbox" id=
"recheckTorrentsOnCompletion">
1086 <label for=
"appInstanceName">QBT_TR(Customize application instance name:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1089 <input type=
"text" id=
"appInstanceName" style=
"width: 15em;" title=
"QBT_TR(It appends the text to the window title to help distinguish qBittorent instances)QBT_TR[CONTEXT=OptionsDialog]" />
1094 <label for=
"refreshInterval">QBT_TR(Refresh interval:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1097 <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]
1102 <label for=
"resolvePeerCountries">QBT_TR(Resolve peer countries:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1105 <input type=
"checkbox" id=
"resolvePeerCountries">
1110 <label for=
"reannounceWhenAddressChanged">QBT_TR(Reannounce to all trackers when IP or port changed:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1113 <input type=
"checkbox" id=
"reannounceWhenAddressChanged" />
1118 <label for=
"enableEmbeddedTracker">QBT_TR(Enable embedded tracker:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1121 <input type=
"checkbox" id=
"enableEmbeddedTracker" />
1126 <label for=
"embeddedTrackerPort">QBT_TR(Embedded tracker port:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1129 <input type=
"text" id=
"embeddedTrackerPort" style=
"width: 15em;" />
1134 <label for=
"embeddedTrackerPortForwarding">QBT_TR(Enable port forwarding for embedded tracker:)QBT_TR[CONTEXT=OptionsDialog]
</label>
1137 <input type=
"checkbox" id=
"embeddedTrackerPortForwarding" />
1140 <tr id=
"rowMarkOfTheWeb">
1142 <label for=
"markOfTheWeb">QBT_TR(Enable Mark-of-the-Web (MOTW) for downloaded files (require macOS or Windows):)QBT_TR[CONTEXT=OptionsDialog]
</label>
1145 <input type=
"checkbox" id=
"markOfTheWeb" />
1150 <label for=
"pythonExecutablePath">QBT_TR(Python executable path (may require restart):)QBT_TR[CONTEXT=OptionsDialog]
</label>
1153 <input type=
"text" id=
"pythonExecutablePath" class=
"pathFile" placeholder=
"QBT_TR((Auto detect if empty))QBT_TR[CONTEXT=OptionsDialog]" style=
"width: 15em;" />
1158 <fieldset class=
"settings">
1159 <legend>QBT_TR(libtorrent Section)QBT_TR[CONTEXT=OptionsDialog]
(
<a href=
"https://www.libtorrent.org/reference-Settings.html" target=
"_blank">QBT_TR(Open documentation)QBT_TR[CONTEXT=HttpServer]
</a>)
</legend>
1163 <label for=
"bdecodeDepthLimit">QBT_TR(Bdecode depth limit:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Bdecoding.html#bdecode()" target=
"_blank">(?)
</a></label>
1166 <input type=
"text" id=
"bdecodeDepthLimit" style=
"width: 15em;" />
1171 <label for=
"bdecodeTokenLimit">QBT_TR(Bdecode token limit:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Bdecoding.html#bdecode()" target=
"_blank">(?)
</a></label>
1174 <input type=
"text" id=
"bdecodeTokenLimit" style=
"width: 15em;" />
1179 <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>
1182 <input type=
"text" id=
"asyncIOThreads" style=
"width: 15em;" />
1185 <tr id=
"rowHashingThreads">
1187 <label for=
"hashingThreads">QBT_TR(Hashing threads:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#hashing_threads" target=
"_blank">(?)
</a></label>
1190 <input type=
"text" id=
"hashingThreads" style=
"width: 15em;" />
1195 <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>
1198 <input type=
"text" id=
"filePoolSize" style=
"width: 15em;" />
1203 <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>
1206 <input type=
"text" id=
"outstandMemoryWhenCheckingTorrents" style=
"width: 15em;" /> QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
1209 <tr id=
"rowDiskCache">
1211 <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>
1214 <input type=
"text" id=
"diskCache" style=
"width: 15em;" /> QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
1217 <tr id=
"rowDiskCacheExpiryInterval">
1219 <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>
1222 <input type=
"text" id=
"diskCacheExpiryInterval" style=
"width: 15em;"> QBT_TR(s)QBT_TR[CONTEXT=OptionsDialog]
1227 <label for=
"diskQueueSize">QBT_TR(Disk queue size:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes" target=
"_blank">(?)
</a></label>
1230 <input type=
"text" id=
"diskQueueSize" style=
"width: 15em;"> QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
1233 <tr id=
"rowDiskIOType">
1235 <label for=
"diskIOType">QBT_TR(Disk IO type (requires restart):)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/single-page-ref.html#default-disk-io-constructor" target=
"_blank">(?)
</a></label>
1238 <select id=
"diskIOType" style=
"width: 15em;">
1239 <option value=
"0">QBT_TR(Default)QBT_TR[CONTEXT=OptionsDialog]
</option>
1240 <option value=
"1">QBT_TR(Memory mapped files)QBT_TR[CONTEXT=OptionsDialog]
</option>
1241 <option value=
"2">QBT_TR(POSIX-compliant)QBT_TR[CONTEXT=OptionsDialog]
</option>
1247 <label for=
"diskIOReadMode">QBT_TR(Disk IO read mode:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#disk_io_read_mode" target=
"_blank">(?)
</a></label>
1250 <select id=
"diskIOReadMode" style=
"width: 15em;">
1251 <option value=
"0">QBT_TR(Disable OS cache)QBT_TR[CONTEXT=OptionsDialog]
</option>
1252 <option value=
"1">QBT_TR(Enable OS cache)QBT_TR[CONTEXT=OptionsDialog]
</option>
1258 <label for=
"diskIOWriteMode">QBT_TR(Disk IO write mode:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode" target=
"_blank">(?)
</a></label>
1261 <select id=
"diskIOWriteMode" style=
"width: 15em;">
1262 <option value=
"0">QBT_TR(Disable OS cache)QBT_TR[CONTEXT=OptionsDialog]
</option>
1263 <option value=
"1">QBT_TR(Enable OS cache)QBT_TR[CONTEXT=OptionsDialog]
</option>
1264 <option value=
"2" id=
"diskIOWriteModeWriteThrough">QBT_TR(Write-through)QBT_TR[CONTEXT=OptionsDialog]
</option>
1268 <tr id=
"rowCoalesceReadsAndWrites">
1270 <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>
1273 <input type=
"checkbox" id=
"coalesceReadsAndWrites" />
1278 <label for=
"pieceExtentAffinity">QBT_TR(Use piece extent affinity:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://libtorrent.org/single-page-ref.html#piece_extent_affinity" target=
"_blank">(?)
</a></label>
1281 <input type=
"checkbox" id=
"pieceExtentAffinity" />
1286 <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>
1289 <input type=
"checkbox" id=
"sendUploadPieceSuggestions" />
1294 <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>
1297 <input type=
"text" id=
"sendBufferWatermark" style=
"width: 15em;" /> QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
1302 <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>
1305 <input type=
"text" id=
"sendBufferLowWatermark" style=
"width: 15em;" /> QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
1310 <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>
1313 <input type=
"text" id=
"sendBufferWatermarkFactor" style=
"width: 15em;" /> %
1318 <label for=
"connectionSpeed">QBT_TR(Outgoing connections per second:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#connection_speed" target=
"_blank">(?)
</a></label>
1321 <input type=
"text" id=
"connectionSpeed" style=
"width: 15em;" />
1326 <label for=
"socketSendBufferSize">QBT_TR(Socket send buffer size [
0: system default]:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#send_socket_buffer_size" target=
"_blank">(?)
</a></label>
1329 <input type=
"text" id=
"socketSendBufferSize" style=
"width: 15em;" /> QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
1334 <label for=
"socketReceiveBufferSize">QBT_TR(Socket receive buffer size [
0: system default]:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#recv_socket_buffer_size" target=
"_blank">(?)
</a></label>
1337 <input type=
"text" id=
"socketReceiveBufferSize" style=
"width: 15em;" /> QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
1342 <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>
1345 <input type=
"text" id=
"socketBacklogSize" style=
"width: 15em;" />
1350 <label for=
"outgoingPortsMin">QBT_TR(Outgoing ports (Min) [
0: disabled]:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#outgoing_port" target=
"_blank">(?)
</a></label>
1353 <input type=
"text" id=
"outgoingPortsMin" style=
"width: 15em;" />
1358 <label for=
"outgoingPortsMax">QBT_TR(Outgoing ports (Max) [
0: disabled]:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#outgoing_port" target=
"_blank">(?)
</a></label>
1361 <input type=
"text" id=
"outgoingPortsMax" style=
"width: 15em;" />
1366 <label for=
"UPnPLeaseDuration">QBT_TR(UPnP lease duration [
0: permanent lease]:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#upnp_lease_duration" target=
"_blank">(?)
</a></label>
1369 <input type=
"text" id=
"UPnPLeaseDuration" style=
"width: 15em;" />
1374 <label for=
"peerToS">QBT_TR(Type of service (ToS) for connections to peers)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#peer_tos" target=
"_blank">(?)
</a></label>
1377 <input type=
"text" id=
"peerToS" style=
"width: 15em;" />
1382 <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>
1385 <select id=
"utpTCPMixedModeAlgorithm" style=
"width: 15em;">
1386 <option value=
"0">QBT_TR(Prefer TCP)QBT_TR[CONTEXT=OptionsDialog]
</option>
1387 <option value=
"1">QBT_TR(Peer proportional (throttles TCP))QBT_TR[CONTEXT=OptionsDialog]
</option>
1393 <label for=
"IDNSupportCheckbox">QBT_TR(Support internationalized domain name (IDN):)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#allow_idna" target=
"_blank">(?)
</a></label>
1396 <input type=
"checkbox" id=
"IDNSupportCheckbox" />
1401 <label for=
"allowMultipleConnectionsFromTheSameIPAddress">QBT_TR(Allow multiple connections from the same IP address:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#allow_multiple_connections_per_ip" target=
"_blank">(?)
</a></label>
1404 <input type=
"checkbox" id=
"allowMultipleConnectionsFromTheSameIPAddress" />
1409 <label for=
"validateHTTPSTrackerCertificate">QBT_TR(Validate HTTPS tracker certificate:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#validate_https_trackers" target=
"_blank">(?)
</a></label>
1412 <input type=
"checkbox" id=
"validateHTTPSTrackerCertificate" />
1417 <label for=
"mitigateSSRF">QBT_TR(Server-side request forgery (SSRF) mitigation:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#ssrf_mitigation" target=
"_blank">(?)
</a></label>
1420 <input type=
"checkbox" id=
"mitigateSSRF" />
1425 <label for=
"blockPeersOnPrivilegedPorts">QBT_TR(Disallow connection to peers on privileged ports:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://libtorrent.org/single-page-ref.html#no_connect_privileged_ports" target=
"_blank">(?)
</a></label>
1428 <input type=
"checkbox" id=
"blockPeersOnPrivilegedPorts" />
1433 <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>
1436 <select id=
"uploadSlotsBehavior" style=
"width: 15em;">
1437 <option value=
"0">QBT_TR(Fixed slots)QBT_TR[CONTEXT=OptionsDialog]
</option>
1438 <option value=
"1">QBT_TR(Upload rate based)QBT_TR[CONTEXT=OptionsDialog]
</option>
1444 <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>
1447 <select id=
"uploadChokingAlgorithm" style=
"width: 15em;">
1448 <option value=
"0">QBT_TR(Round-robin)QBT_TR[CONTEXT=OptionsDialog]
</option>
1449 <option value=
"1">QBT_TR(Fastest upload)QBT_TR[CONTEXT=OptionsDialog]
</option>
1450 <option value=
"2">QBT_TR(Anti-leech)QBT_TR[CONTEXT=OptionsDialog]
</option>
1456 <label for=
"announceAllTrackers">QBT_TR(Always announce to all trackers in a tier:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#announce_to_all_trackers" target=
"_blank">(?)
</a></label>
1459 <input type=
"checkbox" id=
"announceAllTrackers" />
1464 <label for=
"announceAllTiers">QBT_TR(Always announce to all tiers:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#announce_to_all_tiers" target=
"_blank">(?)
</a></label>
1467 <input type=
"checkbox" id=
"announceAllTiers" />
1472 <label for=
"announceIP">QBT_TR(IP address reported to trackers (requires restart):)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#announce_ip" target=
"_blank">(?)
</a></label>
1475 <input type=
"text" id=
"announceIP" style=
"width: 15em;" />
1480 <label for=
"maxConcurrentHTTPAnnounces">QBT_TR(Max concurrent HTTP announces:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#max_concurrent_http_announces" target=
"_blank">(?)
</a></label>
1483 <input type=
"text" id=
"maxConcurrentHTTPAnnounces" style=
"width: 15em;" />
1488 <label for=
"stopTrackerTimeout">QBT_TR(Stop tracker timeout [
0: disabled]:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#stop_tracker_timeout" target=
"_blank">(?)
</a></label>
1491 <input type=
"text" id=
"stopTrackerTimeout" style=
"width: 15em;" />
1496 <label for=
"peerTurnover">QBT_TR(Peer turnover disconnect percentage:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#peer_turnover" target=
"_blank">(?)
</a></label>
1499 <input type=
"text" id=
"peerTurnover" style=
"width: 15em;" /> %
1504 <label for=
"peerTurnoverCutoff">QBT_TR(Peer turnover threshold percentage:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#peer_turnover" target=
"_blank">(?)
</a></label>
1507 <input type=
"text" id=
"peerTurnoverCutoff" style=
"width: 15em;" /> %
1512 <label for=
"peerTurnoverInterval">QBT_TR(Peer turnover disconnect interval:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#peer_turnover" target=
"_blank">(?)
</a></label>
1515 <input type=
"text" id=
"peerTurnoverInterval" style=
"width: 15em;" /> s
1520 <label for=
"requestQueueSize">QBT_TR(Maximum outstanding requests to a single peer:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#max_out_request_queue" target=
"_blank">(?)
</a></label>
1523 <input type=
"text" id=
"requestQueueSize" style=
"width: 15em;" />
1528 <label for=
"dhtBootstrapNodes">QBT_TR(DHT bootstrap nodes:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#dht_bootstrap_nodes" target=
"_blank">(?)
</a></label>
1531 <input type=
"text" id=
"dhtBootstrapNodes" placeholder=
"QBT_TR(Resets to default if empty)QBT_TR[CONTEXT=OptionsDialog]" style=
"width: 15em;" />
1534 <tr id=
"rowI2pInboundQuantity">
1536 <label for=
"i2pInboundQuantity">QBT_TR(I2P inbound quantity:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#i2p_inbound_quantity" target=
"_blank">(?)
</a></label>
1539 <input id=
"i2pInboundQuantity" type=
"number" min=
"1" max=
"16" onchange=
"qBittorrent.Preferences.numberInputLimiter(this);" style=
"width: 15em;" />
1542 <tr id=
"rowI2pOutboundQuantity">
1544 <label for=
"i2pOutboundQuantity">QBT_TR(I2P outbound quantity:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#i2p_outbound_quantity" target=
"_blank">(?)
</a></label>
1547 <input id=
"i2pOutboundQuantity" type=
"number" min=
"1" max=
"16" onchange=
"qBittorrent.Preferences.numberInputLimiter(this);" style=
"width: 15em;" />
1550 <tr id=
"rowI2pInboundLength">
1552 <label for=
"i2pInboundLength">QBT_TR(I2P inbound length:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#i2p_inbound_length" target=
"_blank">(?)
</a></label>
1555 <input id=
"i2pInboundLength" type=
"number" min=
"0" max=
"7" onchange=
"qBittorrent.Preferences.numberInputLimiter(this);" style=
"width: 15em;" />
1558 <tr id=
"rowI2pOutboundLength">
1560 <label for=
"i2pOutboundLength">QBT_TR(I2P outbound length:)QBT_TR[CONTEXT=OptionsDialog]
<a href=
"https://www.libtorrent.org/reference-Settings.html#i2p_outbound_length" target=
"_blank">(?)
</a></label>
1563 <input id=
"i2pOutboundLength" type=
"number" min=
"0" max=
"7" onchange=
"qBittorrent.Preferences.numberInputLimiter(this);" style=
"width: 15em;" />
1570 <div style=
"text-align: center; margin-top: 1em;"><input type=
"button" value=
"QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" onclick=
"qBittorrent.Preferences.applyPreferences();" /></div>
1575 if (window
.qBittorrent
=== undefined)
1576 window
.qBittorrent
= {};
1578 window
.qBittorrent
.Preferences
= (function() {
1579 const exports = function() {
1581 numberInputLimiter
: numberInputLimiter
,
1582 updateFileLogEnabled
: updateFileLogEnabled
,
1583 updateFileLogBackupEnabled
: updateFileLogBackupEnabled
,
1584 updateFileLogDeleteEnabled
: updateFileLogDeleteEnabled
,
1585 updateTempDirEnabled
: updateTempDirEnabled
,
1586 updateExportDirEnabled
: updateExportDirEnabled
,
1587 updateExportDirFinEnabled
: updateExportDirFinEnabled
,
1588 addWatchFolder
: addWatchFolder
,
1589 updateExcludedFileNamesEnabled
: updateExcludedFileNamesEnabled
,
1590 changeWatchFolderSelect
: changeWatchFolderSelect
,
1591 updateMailNotification
: updateMailNotification
,
1592 updateMailAuthSettings
: updateMailAuthSettings
,
1593 sendTestEmail
: sendTestEmail
,
1594 updateAutoRun
: updateAutoRun
,
1595 updateAutoRunOnTorrentAdded
: updateAutoRunOnTorrentAdded
,
1596 generateRandomPort
: generateRandomPort
,
1597 updateMaxConnecEnabled
: updateMaxConnecEnabled
,
1598 updateMaxConnecPerTorrentEnabled
: updateMaxConnecPerTorrentEnabled
,
1599 updateMaxUploadsEnabled
: updateMaxUploadsEnabled
,
1600 updateMaxUploadsPerTorrentEnabled
: updateMaxUploadsPerTorrentEnabled
,
1601 updateI2PSettingsEnabled
: updateI2PSettingsEnabled
,
1602 updatePeerProxySettings
: updatePeerProxySettings
,
1603 updatePeerProxyAuthSettings
: updatePeerProxyAuthSettings
,
1604 updateFilterSettings
: updateFilterSettings
,
1605 updateSchedulingEnabled
: updateSchedulingEnabled
,
1606 updateQueueingSystem
: updateQueueingSystem
,
1607 updateSlowTorrentsSettings
: updateSlowTorrentsSettings
,
1608 updateMaxRatioTimeEnabled
: updateMaxRatioTimeEnabled
,
1609 updateAddTrackersEnabled
: updateAddTrackersEnabled
,
1610 updateHttpsSettings
: updateHttpsSettings
,
1611 updateBypasssAuthSettings
: updateBypasssAuthSettings
,
1612 updateAlternativeWebUISettings
: updateAlternativeWebUISettings
,
1613 updateHostHeaderValidationSettings
: updateHostHeaderValidationSettings
,
1614 updateWebUICustomHTTPHeadersSettings
: updateWebUICustomHTTPHeadersSettings
,
1615 updateWebUIReverseProxySettings
: updateWebUIReverseProxySettings
,
1616 updateDynDnsSettings
: updateDynDnsSettings
,
1617 updateWebuiLocaleSelect
: updateWebuiLocaleSelect
,
1618 registerDynDns
: registerDynDns
,
1619 applyPreferences
: applyPreferences
1624 const numberInputLimiter
= (input
) => {
1625 const min
= input
.getAttribute("min");
1626 const max
= input
.getAttribute("max");
1628 if (min
&& (input
.value
.toInt() < min
.toInt()))
1631 if (max
&& (input
.value
.toInt() > max
.toInt()))
1635 const updateFileLogEnabled = function() {
1636 const isFileLogEnabled
= $("filelog_checkbox").getProperty("checked");
1637 $("filelog_save_path_input").setProperty("disabled", !isFileLogEnabled
);
1638 $("filelog_backup_checkbox").setProperty("disabled", !isFileLogEnabled
);
1639 $("filelog_delete_old_checkbox").setProperty("disabled", !isFileLogEnabled
);
1641 updateFileLogBackupEnabled();
1642 updateFileLogDeleteEnabled();
1645 const updateFileLogBackupEnabled = function() {
1646 const pros
= $("filelog_backup_checkbox").getProperties("disabled", "checked");
1647 $("filelog_max_size_input").setProperty("disabled", pros
.disabled
|| !pros
.checked
);
1650 const updateFileLogDeleteEnabled = function() {
1651 const pros
= $("filelog_delete_old_checkbox").getProperties("disabled", "checked");
1652 $("filelog_age_input").setProperty("disabled", pros
.disabled
|| !pros
.checked
);
1653 $("filelog_age_type_select").setProperty("disabled", pros
.disabled
|| !pros
.checked
);
1657 const watchedFoldersTable
= new HtmlTable($("watched_folders_tab"));
1659 const updateTempDirEnabled = function() {
1660 const isTempDirEnabled
= $("temppath_checkbox").getProperty("checked");
1661 $("temppath_text").setProperty("disabled", !isTempDirEnabled
);
1664 const changeWatchFolderSelect
= (item
) => {
1665 if (item
.value
=== "other") {
1666 item
.nextElementSibling
.hidden
= false;
1667 item
.nextElementSibling
.value
= "QBT_TR(Type folder here)QBT_TR[CONTEXT=ScanFoldersModel]";
1668 item
.nextElementSibling
.select();
1671 item
.nextElementSibling
.hidden
= true;
1672 const text
= item
.options
[item
.selectedIndex
].textContent
;
1673 item
.nextElementSibling
.value
= text
;
1677 const addWatchFolder
= (folder
= "", sel
= "default_folder", other
= "") => {
1678 const pos
= $("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length
;
1679 const myinput
= "<input id='text_watch_" + pos
+ "' type='text' value='" + folder
+ "'>";
1680 const disableInput
= (sel
!== "other");
1681 const mycb
= "<div class='select-watched-folder-editable'>"
1682 + "<select id ='cb_watch_" + pos
+ "' onchange='qBittorrent.Preferences.changeWatchFolderSelect(this)'>"
1683 + "<option value='watch_folder'>QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
1684 + "<option value='default_folder'>QBT_TR(Default save location)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
1685 + "<option value='other'>QBT_TR(Other...)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
1687 + "<input id='cb_watch_txt_" + pos
+ "' type='text' " + (disableInput
? "hidden " : "") + "/>"
1688 + "<img src='images/list-add.svg' id='addFolderImg_" + pos
+ "' alt='Add' style='padding-left:170px;width:16px;cursor:pointer;' onclick='qBittorrent.Preferences.addWatchFolder();' />"
1691 watchedFoldersTable
.push([myinput
, mycb
]);
1692 $("cb_watch_" + pos
).setProperty("value", sel
);
1694 const elt
= $("cb_watch_" + pos
);
1695 other
= elt
.options
[elt
.selectedIndex
].textContent
;
1697 $("cb_watch_txt_" + pos
).setProperty("value", other
);
1699 // hide previous img
1701 $("addFolderImg_" + (pos
- 1)).style
.display
= "none";
1704 const getWatchedFolders
= () => {
1705 const nb_folders
= $("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length
;
1706 const folders
= new Hash();
1707 for (let i
= 0; i
< nb_folders
; ++i
) {
1708 const fpath
= $("text_watch_" + i
).getProperty("value").trim();
1709 if (fpath
.length
> 0) {
1710 const sel
= $("cb_watch_" + i
).getProperty("value").trim();
1713 if (sel
=== "other")
1714 other
= $("cb_watch_txt_" + i
).getProperty("value").trim();
1716 other
= (sel
=== "watch_folder") ? 0 : 1;
1718 folders
.set(fpath
, other
);
1724 const updateExcludedFileNamesEnabled = function() {
1725 const isAExcludedFileNamesEnabled
= $("excludedFileNamesCheckbox").getProperty("checked");
1726 $("excludedFileNamesTextarea").setProperty("disabled", !isAExcludedFileNamesEnabled
);
1729 const updateExportDirEnabled = function() {
1730 const isExportDirEnabled
= $("exportdir_checkbox").getProperty("checked");
1731 $("exportdir_text").setProperty("disabled", !isExportDirEnabled
);
1734 const updateExportDirFinEnabled = function() {
1735 const isExportDirFinEnabled
= $("exportdirfin_checkbox").getProperty("checked");
1736 $("exportdirfin_text").setProperty("disabled", !isExportDirFinEnabled
);
1739 const updateMailNotification = function() {
1740 const isMailNotificationEnabled
= $("mail_notification_checkbox").getProperty("checked");
1741 $("src_email_txt").setProperty("disabled", !isMailNotificationEnabled
);
1742 $("dest_email_txt").setProperty("disabled", !isMailNotificationEnabled
);
1743 $("smtp_server_txt").setProperty("disabled", !isMailNotificationEnabled
);
1744 $("mail_ssl_checkbox").setProperty("disabled", !isMailNotificationEnabled
);
1745 $("mail_auth_checkbox").setProperty("disabled", !isMailNotificationEnabled
);
1746 $("mail_test_button").setProperty("disabled", !isMailNotificationEnabled
);
1748 if (!isMailNotificationEnabled
) {
1749 $("mail_auth_checkbox").setProperty("checked", !isMailNotificationEnabled
);
1750 updateMailAuthSettings();
1754 const updateMailAuthSettings = function() {
1755 const isMailAuthEnabled
= $("mail_auth_checkbox").getProperty("checked");
1756 $("mail_username_text").setProperty("disabled", !isMailAuthEnabled
);
1757 $("mail_password_text").setProperty("disabled", !isMailAuthEnabled
);
1760 const sendTestEmail = function() {
1762 url
: "api/v2/app/sendTestEmail",
1764 onFailure: function() {
1765 alert("QBT_TR(Could not contact qBittorrent)QBT_TR[CONTEXT=HttpServer]");
1767 onSuccess: function() {
1768 alert("QBT_TR(Attempted to send email. Check your inbox to confirm success)QBT_TR[CONTEXT=OptionsDialog]");
1773 const updateAutoRunOnTorrentAdded = function() {
1774 const isAutoRunOnTorrentAddedEnabled
= $("autorunOnTorrentAddedCheckbox").getProperty("checked");
1775 $("autorunOnTorrentAddedProgram").setProperty("disabled", !isAutoRunOnTorrentAddedEnabled
);
1778 const updateAutoRun = function() {
1779 const isAutoRunEnabled
= $("autorun_checkbox").getProperty("checked");
1780 $("autorunProg_txt").setProperty("disabled", !isAutoRunEnabled
);
1785 const updateMaxConnecEnabled = function() {
1786 const isMaxConnecEnabled
= $("max_connec_checkbox").getProperty("checked");
1787 $("max_connec_value").setProperty("disabled", !isMaxConnecEnabled
);
1790 const updateMaxConnecPerTorrentEnabled = function() {
1791 const isMaxConnecPerTorrentEnabled
= $("max_connec_per_torrent_checkbox").getProperty("checked");
1792 $("max_connec_per_torrent_value").setProperty("disabled", !isMaxConnecPerTorrentEnabled
);
1795 const updateMaxUploadsEnabled = function() {
1796 const isMaxUploadsEnabled
= $("max_uploads_checkbox").getProperty("checked");
1797 $("max_uploads_value").setProperty("disabled", !isMaxUploadsEnabled
);
1800 const updateMaxUploadsPerTorrentEnabled = function() {
1801 const isMaxUploadsPerTorrentEnabled
= $("max_uploads_per_torrent_checkbox").getProperty("checked");
1802 $("max_uploads_per_torrent_value").setProperty("disabled", !isMaxUploadsPerTorrentEnabled
);
1805 const updateI2PSettingsEnabled = function() {
1806 const isI2PEnabled
= $("i2pEnabledCheckbox").getProperty("checked");
1807 $("i2pAddress").setProperty("disabled", !isI2PEnabled
);
1808 $("i2pPort").setProperty("disabled", !isI2PEnabled
);
1809 $("i2pMixedMode").setProperty("disabled", !isI2PEnabled
);
1812 const updatePeerProxySettings = function() {
1813 const proxyType
= $("peer_proxy_type_select").getProperty("value");
1814 const isProxyDisabled
= (proxyType
=== "None");
1815 const isProxySocks4
= (proxyType
=== "SOCKS4");
1817 $("peer_proxy_host_text").setProperty("disabled", isProxyDisabled
);
1818 $("peer_proxy_port_value").setProperty("disabled", isProxyDisabled
);
1820 $("peer_proxy_auth_checkbox").setProperty("disabled", (isProxyDisabled
|| isProxySocks4
));
1821 $("proxy_bittorrent_checkbox").setProperty("disabled", isProxyDisabled
);
1822 $("use_peer_proxy_checkbox").setProperty("disabled", (isProxyDisabled
|| !$("proxy_bittorrent_checkbox").getProperty("checked")));
1823 $("proxyHostnameLookupCheckbox").setProperty("disabled", (isProxyDisabled
|| isProxySocks4
));
1824 $("proxy_rss_checkbox").setProperty("disabled", (isProxyDisabled
|| isProxySocks4
));
1825 $("proxy_misc_checkbox").setProperty("disabled", (isProxyDisabled
|| isProxySocks4
));
1827 updatePeerProxyAuthSettings();
1830 const updatePeerProxyAuthSettings = function() {
1831 const proxyType
= $("peer_proxy_type_select").getProperty("value");
1832 const isProxyDisabled
= (proxyType
=== "None");
1833 const isPeerProxyAuthEnabled
= (!$("peer_proxy_auth_checkbox").getProperty("disabled") && $("peer_proxy_auth_checkbox").getProperty("checked"));
1834 $("peer_proxy_username_text").setProperty("disabled", (isProxyDisabled
|| !isPeerProxyAuthEnabled
));
1835 $("peer_proxy_password_text").setProperty("disabled", (isProxyDisabled
|| !isPeerProxyAuthEnabled
));
1838 const updateFilterSettings = function() {
1839 const isIPFilterEnabled
= $("ipfilter_text_checkbox").getProperty("checked");
1840 $("ipfilter_text").setProperty("disabled", !isIPFilterEnabled
);
1844 const updateSchedulingEnabled = function() {
1845 const isLimitSchedulingEnabled
= $("limitSchedulingCheckbox").getProperty("checked");
1846 $("schedule_from_hour").setProperty("disabled", !isLimitSchedulingEnabled
);
1847 $("schedule_from_min").setProperty("disabled", !isLimitSchedulingEnabled
);
1848 $("schedule_to_hour").setProperty("disabled", !isLimitSchedulingEnabled
);
1849 $("schedule_to_min").setProperty("disabled", !isLimitSchedulingEnabled
);
1850 $("schedule_freq_select").setProperty("disabled", !isLimitSchedulingEnabled
);
1854 const updateQueueingSystem = function() {
1855 const isQueueingEnabled
= $("queueing_checkbox").getProperty("checked");
1856 $("max_active_dl_value").setProperty("disabled", !isQueueingEnabled
);
1857 $("max_active_up_value").setProperty("disabled", !isQueueingEnabled
);
1858 $("max_active_to_value").setProperty("disabled", !isQueueingEnabled
);
1859 $("dont_count_slow_torrents_checkbox").setProperty("disabled", !isQueueingEnabled
);
1860 updateSlowTorrentsSettings();
1863 const updateSlowTorrentsSettings = function() {
1864 const isDontCountSlowTorrentsEnabled
= (!$("dont_count_slow_torrents_checkbox").getProperty("disabled")) && $("dont_count_slow_torrents_checkbox").getProperty("checked");
1865 $("dl_rate_threshold").setProperty("disabled", !isDontCountSlowTorrentsEnabled
);
1866 $("ul_rate_threshold").setProperty("disabled", !isDontCountSlowTorrentsEnabled
);
1867 $("torrent_inactive_timer").setProperty("disabled", !isDontCountSlowTorrentsEnabled
);
1870 const updateMaxRatioTimeEnabled = function() {
1871 const isMaxRatioEnabled
= $("max_ratio_checkbox").getProperty("checked");
1872 $("max_ratio_value").setProperty("disabled", !isMaxRatioEnabled
);
1874 const isMaxSeedingTimeEnabled
= $("max_seeding_time_checkbox").getProperty("checked");
1875 $("max_seeding_time_value").setProperty("disabled", !isMaxSeedingTimeEnabled
);
1877 const isMaxInactiveSeedingTimeEnabled
= $("max_inactive_seeding_time_checkbox").getProperty("checked");
1878 $("max_inactive_seeding_time_value").setProperty("disabled", !isMaxInactiveSeedingTimeEnabled
);
1880 $("max_ratio_act").setProperty("disabled", !(isMaxRatioEnabled
|| isMaxSeedingTimeEnabled
|| isMaxInactiveSeedingTimeEnabled
));
1883 const updateAddTrackersEnabled = function() {
1884 const isAddTrackersEnabled
= $("add_trackers_checkbox").getProperty("checked");
1885 $("add_trackers_textarea").setProperty("disabled", !isAddTrackersEnabled
);
1889 const updateHttpsSettings = function() {
1890 const isUseHttpsEnabled
= $("use_https_checkbox").getProperty("checked");
1891 $("ssl_cert_text").setProperty("disabled", !isUseHttpsEnabled
);
1892 $("ssl_key_text").setProperty("disabled", !isUseHttpsEnabled
);
1893 $("secureCookieCheckbox").setProperty("disabled", !isUseHttpsEnabled
);
1896 const updateBypasssAuthSettings = function() {
1897 const isBypassAuthSubnetWhitelistEnabled
= $("bypass_auth_subnet_whitelist_checkbox").getProperty("checked");
1898 $("bypass_auth_subnet_whitelist_textarea").setProperty("disabled", !isBypassAuthSubnetWhitelistEnabled
);
1901 const updateAlternativeWebUISettings = function() {
1902 const isUseAlternativeWebUIEnabled
= $("use_alt_webui_checkbox").getProperty("checked");
1903 $("webui_files_location_textarea").setProperty("disabled", !isUseAlternativeWebUIEnabled
);
1906 const updateHostHeaderValidationSettings = function() {
1907 const isHostHeaderValidationEnabled
= $("host_header_validation_checkbox").getProperty("checked");
1908 $("webui_domain_textarea").setProperty("disabled", !isHostHeaderValidationEnabled
);
1911 const updateWebUICustomHTTPHeadersSettings = function() {
1912 const isEnabled
= $("webUIUseCustomHTTPHeadersCheckbox").getProperty("checked");
1913 $("webUICustomHTTPHeadersTextarea").setProperty("disabled", !isEnabled
);
1916 const updateWebUIReverseProxySettings = function() {
1917 const isEnabled
= $("webUIReverseProxySupportCheckbox").getProperty("checked");
1918 $("webUIReverseProxiesListTextarea").setProperty("disabled", !isEnabled
);
1921 const updateDynDnsSettings = function() {
1922 const isDynDnsEnabled
= $("use_dyndns_checkbox").getProperty("checked");
1923 $("dyndns_select").setProperty("disabled", !isDynDnsEnabled
);
1924 $("dyndns_domain_text").setProperty("disabled", !isDynDnsEnabled
);
1925 $("dyndns_username_text").setProperty("disabled", !isDynDnsEnabled
);
1926 $("dyndns_password_text").setProperty("disabled", !isDynDnsEnabled
);
1929 const registerDynDns = function() {
1930 if ($("dyndns_select").getProperty("value").toInt() === 1)
1931 window
.open("http://www.no-ip.com/services/managed_dns/free_dynamic_dns.html", "NO-IP Registration");
1933 window
.open("https://www.dyndns.com/account/services/hosts/add.html", "DynDNS Registration");
1936 const generateRandomPort = function() {
1939 const port
= Math
.floor(Math
.random() * (max
- min
+ 1) + min
);
1940 $("port_value").setProperty("value", port
);
1943 const time_padding = function(val
) {
1944 let ret
= val
.toString();
1945 if (ret
.length
=== 1)
1951 const updateNetworkInterfaces = function(default_iface
, default_iface_name
) {
1952 const url
= "api/v2/app/networkInterfaceList";
1953 $("networkInterface").getChildren().each(c
=> c
.destroy());
1958 onFailure: function() {
1959 alert("Could not contact qBittorrent");
1961 onSuccess: function(ifaces
) {
1962 if (!Array
.isArray(ifaces
))
1965 // add the current network interface to the options if needed
1966 if (default_iface
&& !ifaces
.some((item
) => item
.value
=== default_iface
))
1967 ifaces
.push({ name
: default_iface_name
|| default_iface
, value
: default_iface
});
1969 $("networkInterface").options
.add(new Option("QBT_TR(Any interface)QBT_TR[CONTEXT=OptionsDialog]", ""));
1970 ifaces
.forEach((item
, index
) => {
1971 $("networkInterface").options
.add(new Option(item
.name
, item
.value
));
1973 $("networkInterface").setProperty("value", default_iface
);
1978 const updateInterfaceAddresses = function(iface
, default_addr
) {
1979 const url
= "api/v2/app/networkInterfaceAddressList";
1980 $("optionalIPAddressToBind").getChildren().each(c
=> c
.destroy());
1988 onFailure: function() {
1989 alert("Could not contact qBittorrent");
1991 onSuccess: function(addresses
) {
1995 $("optionalIPAddressToBind").options
.add(new Option("QBT_TR(All addresses)QBT_TR[CONTEXT=OptionDialog]", ""));
1996 $("optionalIPAddressToBind").options
.add(new Option("QBT_TR(All IPv4 addresses)QBT_TR[CONTEXT=OptionDialog]", "0.0.0.0"));
1997 $("optionalIPAddressToBind").options
.add(new Option("QBT_TR(All IPv6 addresses)QBT_TR[CONTEXT=OptionDialog]", "::"));
1998 addresses
.forEach((item
, index
) => {
1999 $("optionalIPAddressToBind").options
.add(new Option(item
, item
));
2001 $("optionalIPAddressToBind").setProperty("value", default_addr
);
2006 const updateWebuiLocaleSelect
= (selected
) => {
2007 const languages
= [];
2008 for (let i
= 0; i
< $("locale_select").options
.length
; i
++)
2009 languages
.push($("locale_select").options
[i
].value
);
2011 if (!languages
.includes(selected
)) {
2012 const lang
= selected
.slice(0, selected
.indexOf("_"));
2013 selected
= languages
.includes(lang
) ? lang
: "en";
2015 $("locale_select").setProperty("value", selected
);
2018 const loadPreferences = function() {
2019 window
.parent
.qBittorrent
.Cache
.preferences
.init({
2020 onSuccess
: (pref
) => {
2022 $("dblclickDownloadSelect").value
= LocalPreferences
.get("dblclick_download", "1");
2023 $("dblclickCompleteSelect").value
= LocalPreferences
.get("dblclick_complete", "1");
2024 $("filelog_checkbox").setProperty("checked", pref
.file_log_enabled
);
2025 $("filelog_save_path_input").setProperty("value", pref
.file_log_path
);
2026 $("filelog_backup_checkbox").setProperty("checked", pref
.file_log_backup_enabled
);
2027 $("filelog_max_size_input").setProperty("value", pref
.file_log_max_size
);
2028 $("filelog_delete_old_checkbox").setProperty("checked", pref
.file_log_delete_old
);
2029 $("filelog_age_input").setProperty("value", pref
.file_log_age
);
2030 $("filelog_age_type_select").setProperty("value", pref
.file_log_age_type
);
2031 updateFileLogEnabled();
2034 // When adding a torrent
2036 switch (pref
.torrent_content_layout
) {
2047 $("contentlayout_select").getChildren("option")[index
].selected
= true;
2048 $("addToTopOfQueueCheckbox").setProperty("checked", pref
.add_to_top_of_queue
);
2049 $("dontstartdownloads_checkbox").setProperty("checked", pref
.add_stopped_enabled
);
2050 switch (pref
.torrent_stop_condition
) {
2054 case "MetadataReceived":
2057 case "FilesChecked":
2061 $("stopConditionSelect").getChildren("option")[index
].selected
= true;
2062 $("deletetorrentfileafter_checkbox").setProperty("checked", pref
.auto_delete_mode
);
2064 $("preallocateall_checkbox").setProperty("checked", pref
.preallocate_all
);
2065 $("appendext_checkbox").setProperty("checked", pref
.incomplete_files_ext
);
2066 $("unwantedfolder_checkbox").setProperty("checked", pref
.use_unwanted_folder
);
2068 // Saving Management
2069 $("default_tmm_combobox").setProperty("value", pref
.auto_tmm_enabled
);
2070 $("torrent_changed_tmm_combobox").setProperty("value", pref
.torrent_changed_tmm_enabled
);
2071 $("save_path_changed_tmm_combobox").setProperty("value", pref
.save_path_changed_tmm_enabled
);
2072 $("category_changed_tmm_combobox").setProperty("value", pref
.category_changed_tmm_enabled
);
2073 $("use_subcategories_checkbox").setProperty("checked", pref
.use_subcategories
);
2074 $("savepath_text").setProperty("value", pref
.save_path
);
2075 $("temppath_checkbox").setProperty("checked", pref
.temp_path_enabled
);
2076 $("temppath_text").setProperty("value", pref
.temp_path
);
2077 updateTempDirEnabled();
2078 if (pref
.export_dir
!== "") {
2079 $("exportdir_checkbox").setProperty("checked", true);
2080 $("exportdir_text").setProperty("value", pref
.export_dir
);
2083 $("exportdir_checkbox").setProperty("checked", false);
2084 $("exportdir_text").setProperty("value", "");
2086 updateExportDirEnabled();
2087 if (pref
.export_dir_fin
!== "") {
2088 $("exportdirfin_checkbox").setProperty("checked", true);
2089 $("exportdirfin_text").setProperty("value", pref
.export_dir_fin
);
2092 $("exportdirfin_checkbox").setProperty("checked", false);
2093 $("exportdirfin_text").setProperty("value", "");
2095 updateExportDirFinEnabled();
2097 // Automatically add torrents from
2098 for (const folder
in pref
.scan_dirs
) {
2099 if (!Object
.hasOwn(pref
.scan_dirs
, folder
))
2102 const folderType
= pref
.scan_dirs
[folder
];
2105 if (typeof folderType
=== "number") {
2106 sel
= (folderType
=== 0) ? "watch_folder" : "default_folder";
2112 addWatchFolder(folder
, sel
, other
);
2116 // Excluded file names
2117 $("excludedFileNamesCheckbox").setProperty("checked", pref
.excluded_file_names_enabled
);
2118 $("excludedFileNamesTextarea").setProperty("value", pref
.excluded_file_names
);
2120 // Email notification upon download completion
2121 $("mail_notification_checkbox").setProperty("checked", pref
.mail_notification_enabled
);
2122 $("src_email_txt").setProperty("value", pref
.mail_notification_sender
);
2123 $("dest_email_txt").setProperty("value", pref
.mail_notification_email
);
2124 $("smtp_server_txt").setProperty("value", pref
.mail_notification_smtp
);
2125 $("mail_ssl_checkbox").setProperty("checked", pref
.mail_notification_ssl_enabled
);
2126 $("mail_auth_checkbox").setProperty("checked", pref
.mail_notification_auth_enabled
);
2127 $("mail_username_text").setProperty("value", pref
.mail_notification_username
);
2128 $("mail_password_text").setProperty("value", pref
.mail_notification_password
);
2129 updateMailNotification();
2130 updateMailAuthSettings();
2132 // Run an external program on torrent added
2133 $("autorunOnTorrentAddedCheckbox").setProperty("checked", pref
.autorun_on_torrent_added_enabled
);
2134 $("autorunOnTorrentAddedProgram").setProperty("value", pref
.autorun_on_torrent_added_program
);
2135 updateAutoRunOnTorrentAdded();
2136 // Run an external program on torrent finished
2137 $("autorun_checkbox").setProperty("checked", pref
.autorun_enabled
);
2138 $("autorunProg_txt").setProperty("value", pref
.autorun_program
);
2143 $("port_value").setProperty("value", pref
.listen_port
.toInt());
2144 $("upnp_checkbox").setProperty("checked", pref
.upnp
);
2146 // Connections Limits
2147 const max_connec
= pref
.max_connec
.toInt();
2148 if (max_connec
<= 0) {
2149 $("max_connec_checkbox").setProperty("checked", false);
2150 $("max_connec_value").setProperty("value", 500);
2153 $("max_connec_checkbox").setProperty("checked", true);
2154 $("max_connec_value").setProperty("value", max_connec
);
2156 updateMaxConnecEnabled();
2157 const max_connec_per_torrent
= pref
.max_connec_per_torrent
.toInt();
2158 if (max_connec_per_torrent
<= 0) {
2159 $("max_connec_per_torrent_checkbox").setProperty("checked", false);
2160 $("max_connec_per_torrent_value").setProperty("value", 100);
2163 $("max_connec_per_torrent_checkbox").setProperty("checked", true);
2164 $("max_connec_per_torrent_value").setProperty("value", max_connec_per_torrent
);
2166 updateMaxConnecPerTorrentEnabled();
2167 const max_uploads
= pref
.max_uploads
.toInt();
2168 if (max_uploads
<= 0) {
2169 $("max_uploads_checkbox").setProperty("checked", false);
2170 $("max_uploads_value").setProperty("value", 8);
2173 $("max_uploads_checkbox").setProperty("checked", true);
2174 $("max_uploads_value").setProperty("value", max_uploads
);
2176 updateMaxUploadsEnabled();
2177 const max_uploads_per_torrent
= pref
.max_uploads_per_torrent
.toInt();
2178 if (max_uploads_per_torrent
<= 0) {
2179 $("max_uploads_per_torrent_checkbox").setProperty("checked", false);
2180 $("max_uploads_per_torrent_value").setProperty("value", 4);
2183 $("max_uploads_per_torrent_checkbox").setProperty("checked", true);
2184 $("max_uploads_per_torrent_value").setProperty("value", max_uploads_per_torrent
);
2186 updateMaxUploadsPerTorrentEnabled();
2189 $("i2pEnabledCheckbox").setProperty("checked", pref
.i2p_enabled
);
2190 $("i2pAddress").setProperty("value", pref
.i2p_address
);
2191 $("i2pPort").setProperty("value", pref
.i2p_port
);
2192 $("i2pMixedMode").setProperty("checked", pref
.i2p_mixed_mode
);
2193 updateI2PSettingsEnabled();
2196 $("peer_proxy_type_select").setProperty("value", pref
.proxy_type
);
2197 $("peer_proxy_host_text").setProperty("value", pref
.proxy_ip
);
2198 $("peer_proxy_port_value").setProperty("value", pref
.proxy_port
);
2199 $("peer_proxy_auth_checkbox").setProperty("checked", pref
.proxy_auth_enabled
);
2200 $("peer_proxy_username_text").setProperty("value", pref
.proxy_username
);
2201 $("peer_proxy_password_text").setProperty("value", pref
.proxy_password
);
2202 $("proxyHostnameLookupCheckbox").setProperty("checked", pref
.proxy_hostname_lookup
);
2203 $("proxy_bittorrent_checkbox").setProperty("checked", pref
.proxy_bittorrent
);
2204 $("use_peer_proxy_checkbox").setProperty("checked", pref
.proxy_peer_connections
);
2205 $("proxy_rss_checkbox").setProperty("checked", pref
.proxy_rss
);
2206 $("proxy_misc_checkbox").setProperty("checked", pref
.proxy_misc
);
2207 updatePeerProxySettings();
2210 $("ipfilter_text_checkbox").setProperty("checked", pref
.ip_filter_enabled
);
2211 $("ipfilter_text").setProperty("value", pref
.ip_filter_path
);
2212 $("ipfilter_trackers_checkbox").setProperty("checked", pref
.ip_filter_trackers
);
2213 $("banned_IPs_textarea").setProperty("value", pref
.banned_IPs
);
2214 updateFilterSettings();
2217 // Global Rate Limits
2218 $("up_limit_value").setProperty("value", (pref
.up_limit
.toInt() / 1024));
2219 $("dl_limit_value").setProperty("value", (pref
.dl_limit
.toInt() / 1024));
2220 // Alternative Global Rate Limits
2221 $("alt_up_limit_value").setProperty("value", (pref
.alt_up_limit
.toInt() / 1024));
2222 $("alt_dl_limit_value").setProperty("value", (pref
.alt_dl_limit
.toInt() / 1024));
2224 $("enable_protocol_combobox").setProperty("value", pref
.bittorrent_protocol
);
2225 $("limit_utp_rate_checkbox").setProperty("checked", pref
.limit_utp_rate
);
2226 $("limit_tcp_overhead_checkbox").setProperty("checked", pref
.limit_tcp_overhead
);
2227 $("limit_lan_peers_checkbox").setProperty("checked", pref
.limit_lan_peers
);
2230 $("limitSchedulingCheckbox").setProperty("checked", pref
.scheduler_enabled
);
2231 $("schedule_from_hour").setProperty("value", time_padding(pref
.schedule_from_hour
));
2232 $("schedule_from_min").setProperty("value", time_padding(pref
.schedule_from_min
));
2233 $("schedule_to_hour").setProperty("value", time_padding(pref
.schedule_to_hour
));
2234 $("schedule_to_min").setProperty("value", time_padding(pref
.schedule_to_min
));
2235 $("schedule_freq_select").setProperty("value", pref
.scheduler_days
);
2236 updateSchedulingEnabled();
2240 $("dht_checkbox").setProperty("checked", pref
.dht
);
2241 $("pex_checkbox").setProperty("checked", pref
.pex
);
2242 $("lsd_checkbox").setProperty("checked", pref
.lsd
);
2243 const encryption
= pref
.encryption
.toInt();
2244 $("encryption_select").getChildren("option")[encryption
].selected
= true;
2245 $("anonymous_mode_checkbox").setProperty("checked", pref
.anonymous_mode
);
2247 $("maxActiveCheckingTorrents").setProperty("value", pref
.max_active_checking_torrents
);
2250 $("queueing_checkbox").setProperty("checked", pref
.queueing_enabled
);
2251 $("max_active_dl_value").setProperty("value", pref
.max_active_downloads
.toInt());
2252 $("max_active_up_value").setProperty("value", pref
.max_active_uploads
.toInt());
2253 $("max_active_to_value").setProperty("value", pref
.max_active_torrents
.toInt());
2254 $("dont_count_slow_torrents_checkbox").setProperty("checked", pref
.dont_count_slow_torrents
);
2255 $("dl_rate_threshold").setProperty("value", pref
.slow_torrent_dl_rate_threshold
.toInt());
2256 $("ul_rate_threshold").setProperty("value", pref
.slow_torrent_ul_rate_threshold
.toInt());
2257 $("torrent_inactive_timer").setProperty("value", pref
.slow_torrent_inactive_timer
.toInt());
2258 updateQueueingSystem();
2261 $("max_ratio_checkbox").setProperty("checked", pref
.max_ratio_enabled
);
2262 $("max_ratio_value").setProperty("value", (pref
.max_ratio_enabled
? pref
.max_ratio
: 1));
2263 $("max_seeding_time_checkbox").setProperty("checked", pref
.max_seeding_time_enabled
);
2264 $("max_seeding_time_value").setProperty("value", (pref
.max_seeding_time_enabled
? pref
.max_seeding_time
.toInt() : 1440));
2265 $("max_inactive_seeding_time_checkbox").setProperty("checked", pref
.max_inactive_seeding_time_enabled
);
2266 $("max_inactive_seeding_time_value").setProperty("value", (pref
.max_inactive_seeding_time_enabled
? pref
.max_inactive_seeding_time
.toInt() : 1440));
2267 let maxRatioAct
= 0;
2268 switch (pref
.max_ratio_act
.toInt()) {
2276 case 2: // Enable super seeding
2279 case 3: // Remove torrent and files
2283 $("max_ratio_act").getChildren("option")[maxRatioAct
].selected
= true;
2284 updateMaxRatioTimeEnabled();
2287 $("add_trackers_checkbox").setProperty("checked", pref
.add_trackers_enabled
);
2288 $("add_trackers_textarea").setProperty("value", pref
.add_trackers
);
2289 updateAddTrackersEnabled();
2292 $("enable_fetching_rss_feeds_checkbox").setProperty("checked", pref
.rss_processing_enabled
);
2293 $("feed_refresh_interval").setProperty("value", pref
.rss_refresh_interval
);
2294 $("feedFetchDelay").setProperty("value", pref
.rss_fetch_delay
);
2295 $("maximum_article_number").setProperty("value", pref
.rss_max_articles_per_feed
);
2296 $("enable_auto_downloading_rss_torrents_checkbox").setProperty("checked", pref
.rss_auto_downloading_enabled
);
2297 $("downlock_repack_proper_episodes").setProperty("checked", pref
.rss_download_repack_proper_episodes
);
2298 $("rss_filter_textarea").setProperty("value", pref
.rss_smart_episode_filters
);
2302 updateWebuiLocaleSelect(pref
.locale
);
2303 $("performanceWarning").setProperty("checked", pref
.performance_warning
);
2306 $("webui_domain_textarea").setProperty("value", pref
.web_ui_domain_list
);
2307 $("webui_address_value").setProperty("value", pref
.web_ui_address
);
2308 $("webui_port_value").setProperty("value", pref
.web_ui_port
);
2309 $("webui_upnp_checkbox").setProperty("checked", pref
.web_ui_upnp
);
2310 $("use_https_checkbox").setProperty("checked", pref
.use_https
);
2311 $("ssl_cert_text").setProperty("value", pref
.web_ui_https_cert_path
);
2312 $("ssl_key_text").setProperty("value", pref
.web_ui_https_key_path
);
2313 updateHttpsSettings();
2316 $("webui_username_text").setProperty("value", pref
.web_ui_username
);
2317 $("bypass_local_auth_checkbox").setProperty("checked", pref
.bypass_local_auth
);
2318 $("bypass_auth_subnet_whitelist_checkbox").setProperty("checked", pref
.bypass_auth_subnet_whitelist_enabled
);
2319 $("bypass_auth_subnet_whitelist_textarea").setProperty("value", pref
.bypass_auth_subnet_whitelist
);
2320 updateBypasssAuthSettings();
2321 $("webUIMaxAuthFailCountInput").setProperty("value", pref
.web_ui_max_auth_fail_count
.toInt());
2322 $("webUIBanDurationInput").setProperty("value", pref
.web_ui_ban_duration
.toInt());
2323 $("webUISessionTimeoutInput").setProperty("value", pref
.web_ui_session_timeout
.toInt());
2325 // Use alternative WebUI
2326 $("use_alt_webui_checkbox").setProperty("checked", pref
.alternative_webui_enabled
);
2327 $("webui_files_location_textarea").setProperty("value", pref
.alternative_webui_path
);
2328 updateAlternativeWebUISettings();
2331 $("clickjacking_protection_checkbox").setProperty("checked", pref
.web_ui_clickjacking_protection_enabled
);
2332 $("csrf_protection_checkbox").setProperty("checked", pref
.web_ui_csrf_protection_enabled
);
2333 $("secureCookieCheckbox").setProperty("checked", pref
.web_ui_secure_cookie_enabled
);
2334 $("host_header_validation_checkbox").setProperty("checked", pref
.web_ui_host_header_validation_enabled
);
2335 updateHostHeaderValidationSettings();
2337 // Custom HTTP headers
2338 $("webUIUseCustomHTTPHeadersCheckbox").setProperty("checked", pref
.web_ui_use_custom_http_headers_enabled
);
2339 $("webUICustomHTTPHeadersTextarea").setProperty("value", pref
.web_ui_custom_http_headers
);
2340 updateWebUICustomHTTPHeadersSettings();
2343 $("webUIReverseProxySupportCheckbox").setProperty("checked", pref
.web_ui_reverse_proxy_enabled
);
2344 $("webUIReverseProxiesListTextarea").setProperty("value", pref
.web_ui_reverse_proxies_list
);
2345 updateWebUIReverseProxySettings();
2347 // Update my dynamic domain name
2348 $("use_dyndns_checkbox").setProperty("checked", pref
.dyndns_enabled
);
2349 $("dyndns_select").setProperty("value", pref
.dyndns_service
);
2350 $("dyndns_domain_text").setProperty("value", pref
.dyndns_domain
);
2351 $("dyndns_username_text").setProperty("value", pref
.dyndns_username
);
2352 $("dyndns_password_text").setProperty("value", pref
.dyndns_password
);
2353 updateDynDnsSettings();
2355 // Advanced settings
2356 // qBittorrent section
2357 $("resumeDataStorageType").setProperty("value", pref
.resume_data_storage_type
);
2358 $("torrentContentRemoveOption").setProperty("value", pref
.torrent_content_remove_option
);
2359 $("memoryWorkingSetLimit").setProperty("value", pref
.memory_working_set_limit
);
2360 updateNetworkInterfaces(pref
.current_network_interface
, pref
.current_interface_name
);
2361 updateInterfaceAddresses(pref
.current_network_interface
, pref
.current_interface_address
);
2362 $("saveResumeDataInterval").setProperty("value", pref
.save_resume_data_interval
);
2363 $("torrentFileSizeLimit").setProperty("value", (pref
.torrent_file_size_limit
/ 1024 / 1024));
2364 $("recheckTorrentsOnCompletion").setProperty("checked", pref
.recheck_completed_torrents
);
2365 $("appInstanceName").setProperty("value", pref
.app_instance_name
);
2366 $("refreshInterval").setProperty("value", pref
.refresh_interval
);
2367 $("resolvePeerCountries").setProperty("checked", pref
.resolve_peer_countries
);
2368 $("reannounceWhenAddressChanged").setProperty("checked", pref
.reannounce_when_address_changed
);
2369 // libtorrent section
2370 $("bdecodeDepthLimit").setProperty("value", pref
.bdecode_depth_limit
);
2371 $("bdecodeTokenLimit").setProperty("value", pref
.bdecode_token_limit
);
2372 $("asyncIOThreads").setProperty("value", pref
.async_io_threads
);
2373 $("hashingThreads").setProperty("value", pref
.hashing_threads
);
2374 $("filePoolSize").setProperty("value", pref
.file_pool_size
);
2375 $("outstandMemoryWhenCheckingTorrents").setProperty("value", pref
.checking_memory_use
);
2376 $("diskCache").setProperty("value", pref
.disk_cache
);
2377 $("diskCacheExpiryInterval").setProperty("value", pref
.disk_cache_ttl
);
2378 $("diskQueueSize").setProperty("value", (pref
.disk_queue_size
/ 1024));
2379 $("diskIOType").setProperty("value", pref
.disk_io_type
);
2380 $("diskIOReadMode").setProperty("value", pref
.disk_io_read_mode
);
2381 $("diskIOWriteMode").setProperty("value", pref
.disk_io_write_mode
);
2382 $("coalesceReadsAndWrites").setProperty("checked", pref
.enable_coalesce_read_write
);
2383 $("pieceExtentAffinity").setProperty("checked", pref
.enable_piece_extent_affinity
);
2384 $("sendUploadPieceSuggestions").setProperty("checked", pref
.enable_upload_suggestions
);
2385 $("sendBufferWatermark").setProperty("value", pref
.send_buffer_watermark
);
2386 $("sendBufferLowWatermark").setProperty("value", pref
.send_buffer_low_watermark
);
2387 $("sendBufferWatermarkFactor").setProperty("value", pref
.send_buffer_watermark_factor
);
2388 $("connectionSpeed").setProperty("value", pref
.connection_speed
);
2389 $("socketSendBufferSize").setProperty("value", (pref
.socket_send_buffer_size
/ 1024));
2390 $("socketReceiveBufferSize").setProperty("value", (pref
.socket_receive_buffer_size
/ 1024));
2391 $("socketBacklogSize").setProperty("value", pref
.socket_backlog_size
);
2392 $("outgoingPortsMin").setProperty("value", pref
.outgoing_ports_min
);
2393 $("outgoingPortsMax").setProperty("value", pref
.outgoing_ports_max
);
2394 $("UPnPLeaseDuration").setProperty("value", pref
.upnp_lease_duration
);
2395 $("peerToS").setProperty("value", pref
.peer_tos
);
2396 $("utpTCPMixedModeAlgorithm").setProperty("value", pref
.utp_tcp_mixed_mode
);
2397 $("IDNSupportCheckbox").setProperty("checked", pref
.idn_support_enabled
);
2398 $("allowMultipleConnectionsFromTheSameIPAddress").setProperty("checked", pref
.enable_multi_connections_from_same_ip
);
2399 $("validateHTTPSTrackerCertificate").setProperty("checked", pref
.validate_https_tracker_certificate
);
2400 $("mitigateSSRF").setProperty("checked", pref
.ssrf_mitigation
);
2401 $("blockPeersOnPrivilegedPorts").setProperty("checked", pref
.block_peers_on_privileged_ports
);
2402 $("enableEmbeddedTracker").setProperty("checked", pref
.enable_embedded_tracker
);
2403 $("embeddedTrackerPort").setProperty("value", pref
.embedded_tracker_port
);
2404 $("embeddedTrackerPortForwarding").setProperty("checked", pref
.embedded_tracker_port_forwarding
);
2405 $("markOfTheWeb").setProperty("checked", pref
.mark_of_the_web
);
2406 $("pythonExecutablePath").setProperty("value", pref
.python_executable_path
);
2407 $("uploadSlotsBehavior").setProperty("value", pref
.upload_slots_behavior
);
2408 $("uploadChokingAlgorithm").setProperty("value", pref
.upload_choking_algorithm
);
2409 $("announceAllTrackers").setProperty("checked", pref
.announce_to_all_trackers
);
2410 $("announceAllTiers").setProperty("checked", pref
.announce_to_all_tiers
);
2411 $("announceIP").setProperty("value", pref
.announce_ip
);
2412 $("maxConcurrentHTTPAnnounces").setProperty("value", pref
.max_concurrent_http_announces
);
2413 $("stopTrackerTimeout").setProperty("value", pref
.stop_tracker_timeout
);
2414 $("peerTurnover").setProperty("value", pref
.peer_turnover
);
2415 $("peerTurnoverCutoff").setProperty("value", pref
.peer_turnover_cutoff
);
2416 $("peerTurnoverInterval").setProperty("value", pref
.peer_turnover_interval
);
2417 $("requestQueueSize").setProperty("value", pref
.request_queue_size
);
2418 $("dhtBootstrapNodes").setProperty("value", pref
.dht_bootstrap_nodes
);
2419 $("i2pInboundQuantity").setProperty("value", pref
.i2p_inbound_quantity
);
2420 $("i2pOutboundQuantity").setProperty("value", pref
.i2p_outbound_quantity
);
2421 $("i2pInboundLength").setProperty("value", pref
.i2p_inbound_length
);
2422 $("i2pOutboundLength").setProperty("value", pref
.i2p_outbound_length
);
2427 const applyPreferences = function() {
2428 const settings
= {};
2429 // Validate form data
2432 LocalPreferences
.set("dblclick_download", $("dblclickDownloadSelect").value
);
2433 LocalPreferences
.set("dblclick_complete", $("dblclickCompleteSelect").value
);
2434 settings
["file_log_enabled"] = $("filelog_checkbox").getProperty("checked");
2435 settings
["file_log_path"] = $("filelog_save_path_input").getProperty("value");
2436 settings
["file_log_backup_enabled"] = $("filelog_backup_checkbox").getProperty("checked");
2437 settings
["file_log_max_size"] = Number($("filelog_max_size_input").getProperty("value"));
2438 settings
["file_log_delete_old"] = $("filelog_delete_old_checkbox").getProperty("checked");
2439 settings
["file_log_age"] = Number($("filelog_age_input").getProperty("value"));
2440 settings
["file_log_age_type"] = Number($("filelog_age_type_select").getProperty("value"));
2443 // When adding a torrent
2444 settings
["torrent_content_layout"] = $("contentlayout_select").getSelected()[0].getProperty("value");
2445 settings
["add_to_top_of_queue"] = $("addToTopOfQueueCheckbox").getProperty("checked");
2446 settings
["add_stopped_enabled"] = $("dontstartdownloads_checkbox").getProperty("checked");
2447 settings
["torrent_stop_condition"] = $("stopConditionSelect").getSelected()[0].getProperty("value");
2448 settings
["auto_delete_mode"] = Number($("deletetorrentfileafter_checkbox").getProperty("checked"));
2450 settings
["preallocate_all"] = $("preallocateall_checkbox").getProperty("checked");
2451 settings
["incomplete_files_ext"] = $("appendext_checkbox").getProperty("checked");
2452 settings
["use_unwanted_folder"] = $("unwantedfolder_checkbox").getProperty("checked");
2454 // Saving Management
2455 settings
["auto_tmm_enabled"] = ($("default_tmm_combobox").getProperty("value") === "true");
2456 settings
["torrent_changed_tmm_enabled"] = ($("torrent_changed_tmm_combobox").getProperty("value") === "true");
2457 settings
["save_path_changed_tmm_enabled"] = ($("save_path_changed_tmm_combobox").getProperty("value") === "true");
2458 settings
["category_changed_tmm_enabled"] = ($("category_changed_tmm_combobox").getProperty("value") === "true");
2459 settings
["use_subcategories"] = $("use_subcategories_checkbox").getProperty("checked");
2460 settings
["save_path"] = $("savepath_text").getProperty("value");
2461 settings
["temp_path_enabled"] = $("temppath_checkbox").getProperty("checked");
2462 settings
["temp_path"] = $("temppath_text").getProperty("value");
2463 if ($("exportdir_checkbox").getProperty("checked"))
2464 settings
["export_dir"] = $("exportdir_text").getProperty("value");
2466 settings
["export_dir"] = "";
2467 if ($("exportdirfin_checkbox").getProperty("checked"))
2468 settings
["export_dir_fin"] = $("exportdirfin_text").getProperty("value");
2470 settings
["export_dir_fin"] = "";
2472 // Automatically add torrents from
2473 settings
["scan_dirs"] = getWatchedFolders();
2475 // Excluded file names
2476 settings
["excluded_file_names_enabled"] = $("excludedFileNamesCheckbox").getProperty("checked");
2477 settings
["excluded_file_names"] = $("excludedFileNamesTextarea").getProperty("value");
2479 // Email notification upon download completion
2480 settings
["mail_notification_enabled"] = $("mail_notification_checkbox").getProperty("checked");
2481 settings
["mail_notification_sender"] = $("src_email_txt").getProperty("value");
2482 settings
["mail_notification_email"] = $("dest_email_txt").getProperty("value");
2483 settings
["mail_notification_smtp"] = $("smtp_server_txt").getProperty("value");
2484 settings
["mail_notification_ssl_enabled"] = $("mail_ssl_checkbox").getProperty("checked");
2485 settings
["mail_notification_auth_enabled"] = $("mail_auth_checkbox").getProperty("checked");
2486 settings
["mail_notification_username"] = $("mail_username_text").getProperty("value");
2487 settings
["mail_notification_password"] = $("mail_password_text").getProperty("value");
2489 // Run an external program on torrent added
2490 settings
["autorun_on_torrent_added_enabled"] = $("autorunOnTorrentAddedCheckbox").getProperty("checked");
2491 settings
["autorun_on_torrent_added_program"] = $("autorunOnTorrentAddedProgram").getProperty("value");
2492 // Run an external program on torrent finished
2493 settings
["autorun_enabled"] = $("autorun_checkbox").getProperty("checked");
2494 settings
["autorun_program"] = $("autorunProg_txt").getProperty("value");
2498 const listen_port
= $("port_value").getProperty("value").toInt();
2499 if (isNaN(listen_port
) || (listen_port
< 0) || (listen_port
> 65535)) {
2500 alert("QBT_TR(The port used for incoming connections must be between 0 and 65535.)QBT_TR[CONTEXT=HttpServer]");
2503 settings
["listen_port"] = listen_port
;
2504 settings
["upnp"] = $("upnp_checkbox").getProperty("checked");
2506 // Connections Limits
2507 let max_connec
= -1;
2508 if ($("max_connec_checkbox").getProperty("checked")) {
2509 max_connec
= $("max_connec_value").getProperty("value").toInt();
2510 if (isNaN(max_connec
) || (max_connec
<= 0)) {
2511 alert("QBT_TR(Maximum number of connections limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2515 settings
["max_connec"] = max_connec
;
2516 let max_connec_per_torrent
= -1;
2517 if ($("max_connec_per_torrent_checkbox").getProperty("checked")) {
2518 max_connec_per_torrent
= $("max_connec_per_torrent_value").getProperty("value").toInt();
2519 if (isNaN(max_connec_per_torrent
) || (max_connec_per_torrent
<= 0)) {
2520 alert("QBT_TR(Maximum number of connections per torrent limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2524 settings
["max_connec_per_torrent"] = max_connec_per_torrent
;
2525 let max_uploads
= -1;
2526 if ($("max_uploads_checkbox").getProperty("checked")) {
2527 max_uploads
= $("max_uploads_value").getProperty("value").toInt();
2528 if (isNaN(max_uploads
) || (max_uploads
<= 0)) {
2529 alert("QBT_TR(Global number of upload slots limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2533 settings
["max_uploads"] = max_uploads
;
2534 let max_uploads_per_torrent
= -1;
2535 if ($("max_uploads_per_torrent_checkbox").getProperty("checked")) {
2536 max_uploads_per_torrent
= $("max_uploads_per_torrent_value").getProperty("value").toInt();
2537 if (isNaN(max_uploads_per_torrent
) || (max_uploads_per_torrent
<= 0)) {
2538 alert("QBT_TR(Maximum number of upload slots per torrent limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2542 settings
["max_uploads_per_torrent"] = max_uploads_per_torrent
;
2545 settings
["i2p_enabled"] = $("i2pEnabledCheckbox").getProperty("checked");
2546 settings
["i2p_address"] = $("i2pAddress").getProperty("value");
2547 settings
["i2p_port"] = $("i2pPort").getProperty("value").toInt();
2548 settings
["i2p_mixed_mode"] = $("i2pMixedMode").getProperty("checked");
2551 settings
["proxy_type"] = $("peer_proxy_type_select").getProperty("value");
2552 settings
["proxy_ip"] = $("peer_proxy_host_text").getProperty("value");
2553 settings
["proxy_port"] = $("peer_proxy_port_value").getProperty("value").toInt();
2554 settings
["proxy_auth_enabled"] = $("peer_proxy_auth_checkbox").getProperty("checked");
2555 settings
["proxy_username"] = $("peer_proxy_username_text").getProperty("value");
2556 settings
["proxy_password"] = $("peer_proxy_password_text").getProperty("value");
2557 settings
["proxy_hostname_lookup"] = $("proxyHostnameLookupCheckbox").getProperty("checked");
2558 settings
["proxy_bittorrent"] = $("proxy_bittorrent_checkbox").getProperty("checked");
2559 settings
["proxy_peer_connections"] = $("use_peer_proxy_checkbox").getProperty("checked");
2560 settings
["proxy_rss"] = $("proxy_rss_checkbox").getProperty("checked");
2561 settings
["proxy_misc"] = $("proxy_misc_checkbox").getProperty("checked");
2564 settings
["ip_filter_enabled"] = $("ipfilter_text_checkbox").getProperty("checked");
2565 settings
["ip_filter_path"] = $("ipfilter_text").getProperty("value");
2566 settings
["ip_filter_trackers"] = $("ipfilter_trackers_checkbox").getProperty("checked");
2567 settings
["banned_IPs"] = $("banned_IPs_textarea").getProperty("value");
2570 // Global Rate Limits
2571 const up_limit
= $("up_limit_value").getProperty("value").toInt() * 1024;
2572 if (isNaN(up_limit
) || (up_limit
< 0)) {
2573 alert("QBT_TR(Global upload rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2576 settings
["up_limit"] = up_limit
;
2578 const dl_limit
= $("dl_limit_value").getProperty("value").toInt() * 1024;
2579 if (isNaN(dl_limit
) || (dl_limit
< 0)) {
2580 alert("QBT_TR(Global download rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2583 settings
["dl_limit"] = dl_limit
;
2585 // Alternative Global Rate Limits
2586 const alt_up_limit
= $("alt_up_limit_value").getProperty("value").toInt() * 1024;
2587 if (isNaN(alt_up_limit
) || (alt_up_limit
< 0)) {
2588 alert("QBT_TR(Alternative upload rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2591 settings
["alt_up_limit"] = alt_up_limit
;
2593 const alt_dl_limit
= $("alt_dl_limit_value").getProperty("value").toInt() * 1024;
2594 if (isNaN(alt_dl_limit
) || (alt_dl_limit
< 0)) {
2595 alert("QBT_TR(Alternative download rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2598 settings
["alt_dl_limit"] = alt_dl_limit
;
2600 settings
["bittorrent_protocol"] = Number($("enable_protocol_combobox").getProperty("value"));
2601 settings
["limit_utp_rate"] = $("limit_utp_rate_checkbox").getProperty("checked");
2602 settings
["limit_tcp_overhead"] = $("limit_tcp_overhead_checkbox").getProperty("checked");
2603 settings
["limit_lan_peers"] = $("limit_lan_peers_checkbox").getProperty("checked");
2606 const scheduling_enabled
= $("limitSchedulingCheckbox").getProperty("checked");
2607 settings
["scheduler_enabled"] = scheduling_enabled
;
2608 if (scheduling_enabled
) {
2609 settings
["schedule_from_hour"] = $("schedule_from_hour").getProperty("value").toInt();
2610 settings
["schedule_from_min"] = $("schedule_from_min").getProperty("value").toInt();
2611 settings
["schedule_to_hour"] = $("schedule_to_hour").getProperty("value").toInt();
2612 settings
["schedule_to_min"] = $("schedule_to_min").getProperty("value").toInt();
2613 settings
["scheduler_days"] = $("schedule_freq_select").getProperty("value").toInt();
2618 settings
["dht"] = $("dht_checkbox").getProperty("checked");
2619 settings
["pex"] = $("pex_checkbox").getProperty("checked");
2620 settings
["lsd"] = $("lsd_checkbox").getProperty("checked");
2621 settings
["encryption"] = Number($("encryption_select").getSelected()[0].getProperty("value"));
2622 settings
["anonymous_mode"] = $("anonymous_mode_checkbox").getProperty("checked");
2624 settings
["max_active_checking_torrents"] = Number($("maxActiveCheckingTorrents").getProperty("value"));
2627 settings
["queueing_enabled"] = $("queueing_checkbox").getProperty("checked");
2628 if ($("queueing_checkbox").getProperty("checked")) {
2629 const max_active_downloads
= $("max_active_dl_value").getProperty("value").toInt();
2630 if (isNaN(max_active_downloads
) || (max_active_downloads
< -1)) {
2631 alert("QBT_TR(Maximum active downloads must be greater than -1.)QBT_TR[CONTEXT=HttpServer]");
2634 settings
["max_active_downloads"] = max_active_downloads
;
2635 const max_active_uploads
= $("max_active_up_value").getProperty("value").toInt();
2636 if (isNaN(max_active_uploads
) || (max_active_uploads
< -1)) {
2637 alert("QBT_TR(Maximum active uploads must be greater than -1.)QBT_TR[CONTEXT=HttpServer]");
2640 settings
["max_active_uploads"] = max_active_uploads
;
2641 const max_active_torrents
= $("max_active_to_value").getProperty("value").toInt();
2642 if (isNaN(max_active_torrents
) || (max_active_torrents
< -1)) {
2643 alert("QBT_TR(Maximum active torrents must be greater than -1.)QBT_TR[CONTEXT=HttpServer]");
2646 settings
["max_active_torrents"] = max_active_torrents
;
2647 settings
["dont_count_slow_torrents"] = $("dont_count_slow_torrents_checkbox").getProperty("checked");
2648 const dl_rate_threshold
= $("dl_rate_threshold").getProperty("value").toInt();
2649 if (isNaN(dl_rate_threshold
) || (dl_rate_threshold
< 1)) {
2650 alert("QBT_TR(Download rate threshold must be greater than 0.)QBT_TR[CONTEXT=HttpServer]");
2653 settings
["slow_torrent_dl_rate_threshold"] = dl_rate_threshold
;
2654 const ul_rate_threshold
= $("ul_rate_threshold").getProperty("value").toInt();
2655 if (isNaN(ul_rate_threshold
) || (ul_rate_threshold
< 1)) {
2656 alert("QBT_TR(Upload rate threshold must be greater than 0.)QBT_TR[CONTEXT=HttpServer]");
2659 settings
["slow_torrent_ul_rate_threshold"] = ul_rate_threshold
;
2660 const torrent_inactive_timer
= $("torrent_inactive_timer").getProperty("value").toInt();
2661 if (isNaN(torrent_inactive_timer
) || (torrent_inactive_timer
< 1)) {
2662 alert("QBT_TR(Torrent inactivity timer must be greater than 0.)QBT_TR[CONTEXT=HttpServer]");
2665 settings
["slow_torrent_inactive_timer"] = torrent_inactive_timer
;
2668 // Share Ratio Limiting
2670 if ($("max_ratio_checkbox").getProperty("checked")) {
2671 max_ratio
= $("max_ratio_value").getProperty("value").toFloat();
2672 if (isNaN(max_ratio
) || (max_ratio
< 0) || (max_ratio
> 9998)) {
2673 alert("QBT_TR(Share ratio limit must be between 0 and 9998.)QBT_TR[CONTEXT=HttpServer]");
2677 settings
["max_ratio_enabled"] = $("max_ratio_checkbox").getProperty("checked");
2678 settings
["max_ratio"] = max_ratio
;
2680 let max_seeding_time
= -1;
2681 if ($("max_seeding_time_checkbox").getProperty("checked")) {
2682 max_seeding_time
= $("max_seeding_time_value").getProperty("value").toInt();
2683 if (isNaN(max_seeding_time
) || (max_seeding_time
< 0) || (max_seeding_time
> 525600)) {
2684 alert("QBT_TR(Seeding time limit must be between 0 and 525600 minutes.)QBT_TR[CONTEXT=HttpServer]");
2688 settings
["max_seeding_time_enabled"] = $("max_seeding_time_checkbox").getProperty("checked");
2689 settings
["max_seeding_time"] = max_seeding_time
;
2690 settings
["max_ratio_act"] = $("max_ratio_act").getProperty("value").toInt();
2692 let max_inactive_seeding_time
= -1;
2693 if ($("max_inactive_seeding_time_checkbox").getProperty("checked")) {
2694 max_inactive_seeding_time
= $("max_inactive_seeding_time_value").getProperty("value").toInt();
2695 if (isNaN(max_inactive_seeding_time
) || (max_inactive_seeding_time
< 0) || (max_inactive_seeding_time
> 525600)) {
2696 alert("QBT_TR(Seeding time limit must be between 0 and 525600 minutes.)QBT_TR[CONTEXT=HttpServer]");
2700 settings
["max_inactive_seeding_time_enabled"] = $("max_inactive_seeding_time_checkbox").getProperty("checked");
2701 settings
["max_inactive_seeding_time"] = max_inactive_seeding_time
;
2702 settings
["max_ratio_act"] = $("max_ratio_act").getProperty("value").toInt();
2705 settings
["add_trackers_enabled"] = $("add_trackers_checkbox").getProperty("checked");
2706 settings
["add_trackers"] = $("add_trackers_textarea").getProperty("value");
2709 settings
["rss_processing_enabled"] = $("enable_fetching_rss_feeds_checkbox").getProperty("checked");
2710 settings
["rss_refresh_interval"] = Number($("feed_refresh_interval").getProperty("value"));
2711 settings
["rss_fetch_delay"] = Number($("feedFetchDelay").getProperty("value"));
2712 settings
["rss_max_articles_per_feed"] = Number($("maximum_article_number").getProperty("value"));
2713 settings
["rss_auto_downloading_enabled"] = $("enable_auto_downloading_rss_torrents_checkbox").getProperty("checked");
2714 settings
["rss_download_repack_proper_episodes"] = $("downlock_repack_proper_episodes").getProperty("checked");
2715 settings
["rss_smart_episode_filters"] = $("rss_filter_textarea").getProperty("value");
2719 settings
["locale"] = $("locale_select").getProperty("value");
2720 settings
["performance_warning"] = $("performanceWarning").getProperty("checked");
2723 settings
["web_ui_domain_list"] = $("webui_domain_textarea").getProperty("value");
2724 const web_ui_address
= $("webui_address_value").getProperty("value").toString();
2725 const web_ui_port
= $("webui_port_value").getProperty("value").toInt();
2726 if (isNaN(web_ui_port
) || (web_ui_port
< 1) || (web_ui_port
> 65535)) {
2727 alert("QBT_TR(The port used for the WebUI must be between 1 and 65535.)QBT_TR[CONTEXT=HttpServer]");
2730 settings
["web_ui_address"] = web_ui_address
;
2731 settings
["web_ui_port"] = web_ui_port
;
2732 settings
["web_ui_upnp"] = $("webui_upnp_checkbox").getProperty("checked");
2734 const useHTTPS
= $("use_https_checkbox").getProperty("checked");
2735 settings
["use_https"] = useHTTPS
;
2737 const httpsCertificate
= $("ssl_cert_text").getProperty("value");
2738 settings
["web_ui_https_cert_path"] = httpsCertificate
;
2739 if (useHTTPS
&& (httpsCertificate
.length
=== 0)) {
2740 alert("QBT_TR(HTTPS certificate should not be empty)QBT_TR[CONTEXT=OptionsDialog]");
2744 const httpsKey
= $("ssl_key_text").getProperty("value");
2745 settings
["web_ui_https_key_path"] = httpsKey
;
2746 if (useHTTPS
&& (httpsKey
.length
=== 0)) {
2747 alert("QBT_TR(HTTPS key should not be empty)QBT_TR[CONTEXT=OptionsDialog]");
2752 const web_ui_username
= $("webui_username_text").getProperty("value");
2753 if (web_ui_username
.length
< 3) {
2754 alert("QBT_TR(The WebUI username must be at least 3 characters long.)QBT_TR[CONTEXT=OptionsDialog]");
2757 const web_ui_password
= $("webui_password_text").getProperty("value");
2758 if ((0 < web_ui_password
.length
) && (web_ui_password
.length
< 6)) {
2759 alert("QBT_TR(The WebUI password must be at least 6 characters long.)QBT_TR[CONTEXT=OptionsDialog]");
2763 settings
["web_ui_username"] = web_ui_username
;
2764 if (web_ui_password
.length
> 0)
2765 settings
["web_ui_password"] = web_ui_password
;
2766 settings
["bypass_local_auth"] = $("bypass_local_auth_checkbox").getProperty("checked");
2767 settings
["bypass_auth_subnet_whitelist_enabled"] = $("bypass_auth_subnet_whitelist_checkbox").getProperty("checked");
2768 settings
["bypass_auth_subnet_whitelist"] = $("bypass_auth_subnet_whitelist_textarea").getProperty("value");
2769 settings
["web_ui_max_auth_fail_count"] = Number($("webUIMaxAuthFailCountInput").getProperty("value"));
2770 settings
["web_ui_ban_duration"] = Number($("webUIBanDurationInput").getProperty("value"));
2771 settings
["web_ui_session_timeout"] = Number($("webUISessionTimeoutInput").getProperty("value"));
2773 // Use alternative WebUI
2774 const alternative_webui_enabled
= $("use_alt_webui_checkbox").getProperty("checked");
2775 const webui_files_location_textarea
= $("webui_files_location_textarea").getProperty("value");
2776 if (alternative_webui_enabled
&& (webui_files_location_textarea
.trim() === "")) {
2777 alert("QBT_TR(The alternative WebUI files location cannot be blank.)QBT_TR[CONTEXT=OptionsDialog]");
2780 settings
["alternative_webui_enabled"] = alternative_webui_enabled
;
2781 settings
["alternative_webui_path"] = webui_files_location_textarea
;
2784 settings
["web_ui_clickjacking_protection_enabled"] = $("clickjacking_protection_checkbox").getProperty("checked");
2785 settings
["web_ui_csrf_protection_enabled"] = $("csrf_protection_checkbox").getProperty("checked");
2786 settings
["web_ui_secure_cookie_enabled"] = $("secureCookieCheckbox").getProperty("checked");
2787 settings
["web_ui_host_header_validation_enabled"] = $("host_header_validation_checkbox").getProperty("checked");
2789 // Custom HTTP headers
2790 settings
["web_ui_use_custom_http_headers_enabled"] = $("webUIUseCustomHTTPHeadersCheckbox").getProperty("checked");
2791 settings
["web_ui_custom_http_headers"] = $("webUICustomHTTPHeadersTextarea").getProperty("value");
2794 settings
["web_ui_reverse_proxy_enabled"] = $("webUIReverseProxySupportCheckbox").getProperty("checked");
2795 settings
["web_ui_reverse_proxies_list"] = $("webUIReverseProxiesListTextarea").getProperty("value");
2797 // Update my dynamic domain name
2798 settings
["dyndns_enabled"] = $("use_dyndns_checkbox").getProperty("checked");
2799 settings
["dyndns_service"] = Number($("dyndns_select").getProperty("value"));
2800 settings
["dyndns_domain"] = $("dyndns_domain_text").getProperty("value");
2801 settings
["dyndns_username"] = $("dyndns_username_text").getProperty("value");
2802 settings
["dyndns_password"] = $("dyndns_password_text").getProperty("value");
2804 // Update advanced settings
2805 // qBittorrent section
2806 settings
["resume_data_storage_type"] = $("resumeDataStorageType").getProperty("value");
2807 settings
["torrent_content_remove_option"] = $("torrentContentRemoveOption").getProperty("value");
2808 settings
["memory_working_set_limit"] = Number($("memoryWorkingSetLimit").getProperty("value"));
2809 settings
["current_network_interface"] = $("networkInterface").getProperty("value");
2810 settings
["current_interface_address"] = $("optionalIPAddressToBind").getProperty("value");
2811 settings
["save_resume_data_interval"] = Number($("saveResumeDataInterval").getProperty("value"));
2812 settings
["torrent_file_size_limit"] = ($("torrentFileSizeLimit").getProperty("value") * 1024 * 1024);
2813 settings
["recheck_completed_torrents"] = $("recheckTorrentsOnCompletion").getProperty("checked");
2814 settings
["app_instance_name"] = $("appInstanceName").getProperty("value");
2815 settings
["refresh_interval"] = Number($("refreshInterval").getProperty("value"));
2816 settings
["resolve_peer_countries"] = $("resolvePeerCountries").getProperty("checked");
2817 settings
["reannounce_when_address_changed"] = $("reannounceWhenAddressChanged").getProperty("checked");
2819 // libtorrent section
2820 settings
["bdecode_depth_limit"] = Number($("bdecodeDepthLimit").getProperty("value"));
2821 settings
["bdecode_token_limit"] = Number($("bdecodeTokenLimit").getProperty("value"));
2822 settings
["async_io_threads"] = Number($("asyncIOThreads").getProperty("value"));
2823 settings
["hashing_threads"] = Number($("hashingThreads").getProperty("value"));
2824 settings
["file_pool_size"] = Number($("filePoolSize").getProperty("value"));
2825 settings
["checking_memory_use"] = Number($("outstandMemoryWhenCheckingTorrents").getProperty("value"));
2826 settings
["disk_cache"] = Number($("diskCache").getProperty("value"));
2827 settings
["disk_cache_ttl"] = Number($("diskCacheExpiryInterval").getProperty("value"));
2828 settings
["disk_queue_size"] = (Number($("diskQueueSize").getProperty("value")) * 1024);
2829 settings
["disk_io_type"] = Number($("diskIOType").getProperty("value"));
2830 settings
["disk_io_read_mode"] = Number($("diskIOReadMode").getProperty("value"));
2831 settings
["disk_io_write_mode"] = Number($("diskIOWriteMode").getProperty("value"));
2832 settings
["enable_coalesce_read_write"] = $("coalesceReadsAndWrites").getProperty("checked");
2833 settings
["enable_piece_extent_affinity"] = $("pieceExtentAffinity").getProperty("checked");
2834 settings
["enable_upload_suggestions"] = $("sendUploadPieceSuggestions").getProperty("checked");
2835 settings
["send_buffer_watermark"] = Number($("sendBufferWatermark").getProperty("value"));
2836 settings
["send_buffer_low_watermark"] = Number($("sendBufferLowWatermark").getProperty("value"));
2837 settings
["send_buffer_watermark_factor"] = Number($("sendBufferWatermarkFactor").getProperty("value"));
2838 settings
["connection_speed"] = Number($("connectionSpeed").getProperty("value"));
2839 settings
["socket_send_buffer_size"] = ($("socketSendBufferSize").getProperty("value") * 1024);
2840 settings
["socket_receive_buffer_size"] = ($("socketReceiveBufferSize").getProperty("value") * 1024);
2841 settings
["socket_backlog_size"] = Number($("socketBacklogSize").getProperty("value"));
2842 settings
["outgoing_ports_min"] = Number($("outgoingPortsMin").getProperty("value"));
2843 settings
["outgoing_ports_max"] = Number($("outgoingPortsMax").getProperty("value"));
2844 settings
["upnp_lease_duration"] = Number($("UPnPLeaseDuration").getProperty("value"));
2845 settings
["peer_tos"] = Number($("peerToS").getProperty("value"));
2846 settings
["utp_tcp_mixed_mode"] = Number($("utpTCPMixedModeAlgorithm").getProperty("value"));
2847 settings
["idn_support_enabled"] = $("IDNSupportCheckbox").getProperty("checked");
2848 settings
["enable_multi_connections_from_same_ip"] = $("allowMultipleConnectionsFromTheSameIPAddress").getProperty("checked");
2849 settings
["validate_https_tracker_certificate"] = $("validateHTTPSTrackerCertificate").getProperty("checked");
2850 settings
["ssrf_mitigation"] = $("mitigateSSRF").getProperty("checked");
2851 settings
["block_peers_on_privileged_ports"] = $("blockPeersOnPrivilegedPorts").getProperty("checked");
2852 settings
["enable_embedded_tracker"] = $("enableEmbeddedTracker").getProperty("checked");
2853 settings
["embedded_tracker_port"] = Number($("embeddedTrackerPort").getProperty("value"));
2854 settings
["embedded_tracker_port_forwarding"] = $("embeddedTrackerPortForwarding").getProperty("checked");
2855 settings
["mark_of_the_web"] = $("markOfTheWeb").getProperty("checked");
2856 settings
["python_executable_path"] = $("pythonExecutablePath").getProperty("value");
2857 settings
["upload_slots_behavior"] = Number($("uploadSlotsBehavior").getProperty("value"));
2858 settings
["upload_choking_algorithm"] = Number($("uploadChokingAlgorithm").getProperty("value"));
2859 settings
["announce_to_all_trackers"] = $("announceAllTrackers").getProperty("checked");
2860 settings
["announce_to_all_tiers"] = $("announceAllTiers").getProperty("checked");
2861 settings
["announce_ip"] = $("announceIP").getProperty("value");
2862 settings
["max_concurrent_http_announces"] = Number($("maxConcurrentHTTPAnnounces").getProperty("value"));
2863 settings
["stop_tracker_timeout"] = Number($("stopTrackerTimeout").getProperty("value"));
2864 settings
["peer_turnover"] = Number($("peerTurnover").getProperty("value"));
2865 settings
["peer_turnover_cutoff"] = Number($("peerTurnoverCutoff").getProperty("value"));
2866 settings
["peer_turnover_interval"] = Number($("peerTurnoverInterval").getProperty("value"));
2867 settings
["request_queue_size"] = Number($("requestQueueSize").getProperty("value"));
2868 settings
["dht_bootstrap_nodes"] = $("dhtBootstrapNodes").getProperty("value");
2869 settings
["i2p_inbound_quantity"] = Number($("i2pInboundQuantity").getProperty("value"));
2870 settings
["i2p_outbound_quantity"] = Number($("i2pOutboundQuantity").getProperty("value"));
2871 settings
["i2p_inbound_length"] = Number($("i2pInboundLength").getProperty("value"));
2872 settings
["i2p_outbound_length"] = Number($("i2pOutboundLength").getProperty("value"));
2875 window
.parent
.qBittorrent
.Cache
.preferences
.set({
2877 onFailure: function() {
2878 alert("QBT_TR(Unable to save program preferences, qBittorrent is probably unreachable.)QBT_TR[CONTEXT=HttpServer]");
2879 window
.parent
.qBittorrent
.Client
.closeWindows();
2881 onSuccess: function() {
2883 window
.parent
.location
.reload();
2884 window
.parent
.qBittorrent
.Client
.closeWindows();
2890 const buildInfo
= window
.qBittorrent
.Cache
.buildInfo
.get();
2892 const libtorrentVersion
= window
.qBittorrent
.Misc
.parseVersion(buildInfo
.libtorrent
);
2893 if (libtorrentVersion
.valid
) {
2894 if (libtorrentVersion
.major
>= 2) {
2895 $("rowDiskCache").style
.display
= "none";
2896 $("rowDiskCacheExpiryInterval").style
.display
= "none";
2897 $("rowCoalesceReadsAndWrites").style
.display
= "none";
2900 $("fieldsetI2p").style
.display
= "none";
2901 $("rowMemoryWorkingSetLimit").style
.display
= "none";
2902 $("rowHashingThreads").style
.display
= "none";
2903 $("rowDiskIOType").style
.display
= "none";
2904 $("rowI2pInboundQuantity").style
.display
= "none";
2905 $("rowI2pOutboundQuantity").style
.display
= "none";
2906 $("rowI2pInboundLength").style
.display
= "none";
2907 $("rowI2pOutboundLength").style
.display
= "none";
2910 if (!((libtorrentVersion
.major
>= 2) && (libtorrentVersion
.minor
>= 0) && (libtorrentVersion
.fix
>= 6)))
2911 $("diskIOWriteModeWriteThrough").style
.display
= "none";
2914 if ((buildInfo
.platform
!== "macos") && (buildInfo
.platform
!== "windows"))
2915 $("rowMarkOfTheWeb").style
.display
= "none";
2917 $("networkInterface").addEvent("change", function() {
2918 updateInterfaceAddresses($(this).getProperty("value"), "");
2926 Object
.freeze(window
.qBittorrent
.Preferences
);
2928 window
.qBittorrent
.pathAutofill
.attachPathAutofill();