Add URL link for reverse proxy setup examples
[qBittorrent.git] / src / webui / www / private / views / preferences.html
blob2e4b8695a3be5f00a6df31043ee9e7b1a971fb5d
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">
6 ${LANGUAGE_OPTIONS}
7 </select>
8 </fieldset>
10 <fieldset class="settings">
11 <legend>QBT_TR(Transfer list)QBT_TR[CONTEXT=OptionsDialog]</legend>
12 <div class="formRow" style="margin-bottom: 3px;">
13 <input type="checkbox" id="useAltRowColorsInput">
14 <label for="useAltRowColorsInput">QBT_TR(Use alternating row colors)QBT_TR[CONTEXT=OptionsDialog]</label>
15 </div>
16 <fieldset class="settings">
17 <legend>QBT_TR(Action on double-click)QBT_TR[CONTEXT=OptionsDialog]</legend>
18 <table>
19 <tbody>
20 <tr>
21 <td><label for="dblclickDownloadSelect">QBT_TR(Downloading torrents:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
22 <td>
23 <select id="dblclickDownloadSelect">
24 <option value="1" selected>QBT_TR(Start / stop torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
25 <option value="0">QBT_TR(No action)QBT_TR[CONTEXT=OptionsDialog]</option>
26 </select>
27 </td>
28 </tr>
29 <tr>
30 <td><label for="dblclickCompleteSelect">QBT_TR(Completed torrents:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
31 <td>
32 <select id="dblclickCompleteSelect">
33 <option value="1" selected>QBT_TR(Start / stop torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
34 <option value="0">QBT_TR(No action)QBT_TR[CONTEXT=OptionsDialog]</option>
35 </select>
36 </td>
37 </tr>
38 </tbody>
39 </table>
40 </fieldset>
41 <div class="formRow" style="margin-bottom: 3px;">
42 <input type="checkbox" id="hideZeroFiltersCheckbox">
43 <label for="hideZeroFiltersCheckbox">QBT_TR(Auto hide zero status filters)QBT_TR[CONTEXT=OptionsDialog]</label>
44 </div>
45 </fieldset>
47 <fieldset class="settings">
48 <legend>
49 <input type="checkbox" id="filelog_checkbox" onclick="qBittorrent.Preferences.updateFileLogEnabled();">
50 <label for="filelog_checkbox">QBT_TR(Log Files)QBT_TR[CONTEXT=OptionsDialog]</label>
51 </legend>
52 <div class="formRow">
53 <label for="filelog_save_path_input">QBT_TR(Save path:)QBT_TR[CONTEXT=OptionsDialog]</label>
54 <input type="text" id="filelog_save_path_input" class="pathDirectory">
55 </div>
56 <table>
57 <tbody>
58 <tr>
59 <td><input type="checkbox" id="filelog_backup_checkbox" onclick="qBittorrent.Preferences.updateFileLogBackupEnabled();"></td>
60 <td><label id="filelogMaxSizeLabel" for="filelog_backup_checkbox">QBT_TR(Backup the log file after:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
61 <td><input id="filelog_max_size_input" type="number" min="1" max="1024000" value="65" onchange="qBittorrent.Preferences.numberInputLimiter(this);" aria-labelledby="filelogMaxSizeLabel">QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]</td>
62 </tr>
63 <tr>
64 <td><input type="checkbox" id="filelog_delete_old_checkbox" onclick="qBittorrent.Preferences.updateFileLogDeleteEnabled();"></td>
65 <td><label id="filelogDeleteOldLabel" for="filelog_delete_old_checkbox">QBT_TR(Delete backup logs older than:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
66 <td>
67 <input type="number" min="1" max="365" value="6" id="filelog_age_input" onchange="qBittorrent.Preferences.numberInputLimiter(this);" aria-labelledby="filelogDeleteOldLabel">
68 <select id="filelog_age_type_select" aria-labelledby="filelogDeleteOldLabel">
69 <option value="0">QBT_TR(days)QBT_TR[CONTEXT=OptionsDialog]</option>
70 <option value="1" selected>QBT_TR(months)QBT_TR[CONTEXT=OptionsDialog]</option>
71 <option value="2">QBT_TR(years)QBT_TR[CONTEXT=OptionsDialog]</option>
72 </select>
73 </td>
74 </tr>
75 </tbody>
76 </table>
77 </fieldset>
79 <div class="formRow" style="margin-bottom: 5px;">
80 <input type="checkbox" id="performanceWarning">
81 <label for="performanceWarning">QBT_TR(Log performance warnings)QBT_TR[CONTEXT=OptionsDialog]</label>
82 </div>
84 <fieldset class="settings">
85 <legend title="QBT_TR(Following settings are WebUI only)QBT_TR[CONTEXT=OptionsDialog]">QBT_TR(Custom WebUI settings)QBT_TR[CONTEXT=OptionsDialog]</legend>
86 <div class="formRow" style="margin-bottom: 3px;">
87 <input type="checkbox" id="displayFullURLTrackerColumn">
88 <label for="displayFullURLTrackerColumn">QBT_TR(Display full announce URL in the Tracker column)QBT_TR[CONTEXT=OptionsDialog]</label>
89 </div>
90 </fieldset>
91 </div>
93 <div id="DownloadsTab" class="PrefTab invisible">
94 <fieldset class="settings">
95 <legend>QBT_TR(When adding a torrent)QBT_TR[CONTEXT=OptionsDialog]</legend>
96 <div class="formRow">
97 <label for="contentlayout_select">QBT_TR(Torrent content layout:)QBT_TR[CONTEXT=OptionsDialog]</label>
98 <select id="contentlayout_select">
99 <option value="Original">QBT_TR(Original)QBT_TR[CONTEXT=OptionsDialog]</option>
100 <option value="Subfolder">QBT_TR(Create subfolder)QBT_TR[CONTEXT=OptionsDialog]</option>
101 <option value="NoSubfolder">QBT_TR(Don't create subfolder)QBT_TR[CONTEXT=OptionsDialog]</option>
102 </select>
103 </div>
104 <div class="formRow">
105 <input type="checkbox" id="addToTopOfQueueCheckbox">
106 <label for="addToTopOfQueueCheckbox">QBT_TR(Add to top of queue)QBT_TR[CONTEXT=OptionsDialog]</label>
107 </div>
108 <div class="formRow">
109 <input type="checkbox" id="dontstartdownloads_checkbox">
110 <label for="dontstartdownloads_checkbox">QBT_TR(Do not start the download automatically)QBT_TR[CONTEXT=OptionsDialog]</label>
111 </div>
112 <div class="formRow">
113 <label for="stopConditionSelect">QBT_TR(Torrent stop condition:)QBT_TR[CONTEXT=OptionsDialog]</label>
114 <select id="stopConditionSelect">
115 <option value="None">QBT_TR(None)QBT_TR[CONTEXT=OptionsDialog]</option>
116 <option value="MetadataReceived">QBT_TR(Metadata received)QBT_TR[CONTEXT=OptionsDialog]</option>
117 <option value="FilesChecked">QBT_TR(Files checked)QBT_TR[CONTEXT=OptionsDialog]</option>
118 </select>
119 </div>
120 <fieldset class="settings">
121 <legend>QBT_TR(When duplicate torrent is being added)QBT_TR[CONTEXT=OptionsDialog]</legend>
122 <div class="formRow">
123 <input type="checkbox" id="mergeTrackersInput">
124 <label for="mergeTrackersInput">QBT_TR(Merge trackers to existing torrent)QBT_TR[CONTEXT=OptionsDialog]</label>
125 </div>
126 </fieldset>
127 <div class="formRow">
128 <input type="checkbox" id="deletetorrentfileafter_checkbox">
129 <label for="deletetorrentfileafter_checkbox">QBT_TR(Delete .torrent files afterwards)QBT_TR[CONTEXT=OptionsDialog]</label>
130 </div>
131 </fieldset>
133 <div class="formRow">
134 <input type="checkbox" id="preallocateall_checkbox">
135 <label for="preallocateall_checkbox">QBT_TR(Pre-allocate disk space for all files)QBT_TR[CONTEXT=OptionsDialog]</label>
136 </div>
137 <div class="formRow">
138 <span id="appendexttr">
139 <input type="checkbox" id="appendext_checkbox">
140 <label for="appendext_checkbox">QBT_TR(Append .!qB extension to incomplete files)QBT_TR[CONTEXT=OptionsDialog]</label>
141 </span>
142 </div>
143 <div class="formRow">
144 <span id="unwantedfoldertr">
145 <input type="checkbox" id="unwantedfolder_checkbox">
146 <label for="unwantedfolder_checkbox">QBT_TR(Keep unselected files in ".unwanted" folder)QBT_TR[CONTEXT=OptionsDialog]</label>
147 </span>
148 </div>
150 <fieldset class="settings">
151 <legend>QBT_TR(Saving Management)QBT_TR[CONTEXT=HttpServer]</legend>
152 <table>
153 <tbody>
154 <tr>
155 <td>
156 <label for="default_tmm_combobox">QBT_TR(Default Torrent Management Mode:)QBT_TR[CONTEXT=OptionsDialog]</label>
157 </td>
158 <td>
159 <select id="default_tmm_combobox">
160 <option value="false" selected>QBT_TR(Manual)QBT_TR[CONTEXT=OptionsDialog]</option>
161 <option value="true">QBT_TR(Automatic)QBT_TR[CONTEXT=OptionsDialog]</option>
162 </select>
163 </td>
164 </tr>
165 <tr>
166 <td>
167 <label for="torrent_changed_tmm_combobox">QBT_TR(When Torrent Category changed:)QBT_TR[CONTEXT=OptionsDialog]</label>
168 </td>
169 <td>
170 <select id="torrent_changed_tmm_combobox">
171 <option value="true">QBT_TR(Relocate torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
172 <option value="false" selected>QBT_TR(Switch torrent to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]</option>
173 </select>
174 </td>
175 </tr>
176 <tr>
177 <td>
178 <label for="save_path_changed_tmm_combobox">QBT_TR(When Default Save Path changed:)QBT_TR[CONTEXT=OptionsDialog]</label>
179 </td>
180 <td>
181 <select id="save_path_changed_tmm_combobox">
182 <option value="true">QBT_TR(Relocate affected torrents)QBT_TR[CONTEXT=OptionsDialog]</option>
183 <option value="false" selected>QBT_TR(Switch affected torrents to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]</option>
184 </select>
185 </td>
186 </tr>
187 <tr>
188 <td>
189 <label for="category_changed_tmm_combobox">QBT_TR(When Category Save Path changed:)QBT_TR[CONTEXT=OptionsDialog]</label>
190 </td>
191 <td>
192 <select id="category_changed_tmm_combobox">
193 <option value="true">QBT_TR(Relocate affected torrents)QBT_TR[CONTEXT=OptionsDialog]</option>
194 <option value="false" selected>QBT_TR(Switch affected torrents to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]</option>
195 </select>
196 </td>
197 </tr>
198 </tbody>
199 </table>
200 <div class="formRow">
201 <input type="checkbox" id="use_subcategories_checkbox">
202 <label for="use_subcategories_checkbox">QBT_TR(Use Subcategories)QBT_TR[CONTEXT=OptionsDialog]</label>
203 </div>
204 <div class="formRow">
205 <input type="checkbox" id="categoryPathsManualModeCheckbox" title="QBT_TR(Resolve relative Save Path against appropriate Category path instead of Default one)QBT_TR[CONTEXT=OptionsDialog]">
206 <label for="categoryPathsManualModeCheckbox">QBT_TR(Use Category paths in Manual Mode)QBT_TR[CONTEXT=OptionsDialog]</label>
207 </div>
208 <table>
209 <tbody>
210 <tr>
211 <td>
212 <label for="savepath_text">QBT_TR(Default Save Path:)QBT_TR[CONTEXT=OptionsDialog]</label>
213 </td>
214 <td>
215 <input type="text" id="savepath_text" class="pathDirectory" autocorrect="off" autocapitalize="none">
216 </td>
217 </tr>
218 <tr>
219 <td>
220 <input type="checkbox" id="temppath_checkbox" onclick="qBittorrent.Preferences.updateTempDirEnabled();">
221 <label id="tempPathLabel" for="temppath_checkbox">QBT_TR(Keep incomplete torrents in:)QBT_TR[CONTEXT=OptionsDialog]</label>
222 </td>
223 <td>
224 <input type="text" id="temppath_text" class="pathDirectory" autocorrect="off" autocapitalize="none" aria-labelledby="tempPathLabel">
225 </td>
226 </tr>
227 <tr>
228 <td>
229 <input type="checkbox" id="exportdir_checkbox" onclick="qBittorrent.Preferences.updateExportDirEnabled();">
230 <label id="exportDirLabel" for="exportdir_checkbox">QBT_TR(Copy .torrent files to:)QBT_TR[CONTEXT=OptionsDialog]</label>
231 </td>
232 <td>
233 <input type="text" id="exportdir_text" class="pathDirectory" autocorrect="off" autocapitalize="none" aria-labelledby="exportDirLabel">
234 </td>
235 </tr>
236 <tr>
237 <td>
238 <input type="checkbox" id="exportdirfin_checkbox" onclick="qBittorrent.Preferences.updateExportDirFinEnabled();">
239 <label id="exportDirFinLabel" for="exportdirfin_checkbox">QBT_TR(Copy .torrent files for finished downloads to:)QBT_TR[CONTEXT=OptionsDialog]</label>
240 </td>
241 <td>
242 <input type="text" id="exportdirfin_text" class="pathDirectory" autocorrect="off" autocapitalize="none" aria-labelledby="exportDirFinLabel">
243 </td>
244 </tr>
245 </tbody>
246 </table>
247 </fieldset>
249 <fieldset class="settings">
250 <legend>QBT_TR(Automatically add torrents from:)QBT_TR[CONTEXT=OptionsDialog]</legend>
251 <table id="watched_folders_tab" style="border: 1px solid black;">
252 <thead>
253 <tr>
254 <th scope="col">QBT_TR(Monitored Folder)QBT_TR[CONTEXT=ScanFoldersModel]</th>
255 <th scope="col">QBT_TR(Override Save Location)QBT_TR[CONTEXT=ScanFoldersModel]</th>
256 </tr>
257 </thead>
258 <tbody></tbody>
259 </table>
260 </fieldset>
262 <fieldset class="settings">
263 <legend>
264 <input type="checkbox" id="excludedFileNamesCheckbox" onclick="qBittorrent.Preferences.updateExcludedFileNamesEnabled();">
265 <label id="excludedFileNamesLabel" for="excludedFileNamesCheckbox">QBT_TR(Excluded file names)QBT_TR[CONTEXT=OptionsDialog]</label>
266 </legend>
267 <textarea id="excludedFileNamesTextarea" rows="6" cols="70" aria-labelledby="excludedFileNamesLabel"></textarea>
268 </fieldset>
270 <fieldset class="settings">
271 <legend>
272 <input type="checkbox" id="mail_notification_checkbox" onclick="qBittorrent.Preferences.updateMailNotification();">
273 <label for="mail_notification_checkbox">QBT_TR(Email notification upon download completion)QBT_TR[CONTEXT=OptionsDialog]</label>
274 </legend>
275 <table>
276 <tbody>
277 <tr>
278 <td>
279 <label for="src_email_txt">QBT_TR(From:)QBT_TR[CONTEXT=OptionsDialog]</label>
280 </td>
281 <td>
282 <input type="text" id="src_email_txt">
283 </td>
284 </tr>
285 <tr>
286 <td>
287 <label for="dest_email_txt">QBT_TR(To:)QBT_TR[CONTEXT=OptionsDialog]</label>
288 </td>
289 <td>
290 <input type="text" id="dest_email_txt">
291 </td>
292 </tr>
293 <tr>
294 <td>
295 <label for="smtp_server_txt">QBT_TR(SMTP server:)QBT_TR[CONTEXT=OptionsDialog]</label>
296 </td>
297 <td>
298 <input type="text" id="smtp_server_txt">
299 </td>
300 </tr>
301 </tbody>
302 </table>
303 <div class="formRow">
304 <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>
305 </div>
306 <fieldset class="settings">
307 <legend>
308 <input type="checkbox" id="mail_auth_checkbox" onclick="qBittorrent.Preferences.updateMailAuthSettings();">
309 <label for="mail_auth_checkbox">QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]</label>
310 </legend>
311 <table>
312 <tbody>
313 <tr>
314 <td>
315 <label for="mail_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]</label>
316 </td>
317 <td>
318 <input type="text" id="mail_username_text">
319 </td>
320 </tr>
321 <tr>
322 <td>
323 <label for="mail_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]</label>
324 </td>
325 <td>
326 <input type="password" id="mail_password_text">
327 </td>
328 </tr>
329 </tbody>
330 </table>
331 </fieldset>
332 <div class="formRow">
333 <input type="button" id="mail_test_button" value="QBT_TR(Send test email)QBT_TR[CONTEXT=OptionsDialog]" onclick="qBittorrent.Preferences.sendTestEmail();">
334 </div>
335 </fieldset>
337 <fieldset class="settings">
338 <legend>
339 QBT_TR(Run external program)QBT_TR[CONTEXT=OptionsDialog]
340 </legend>
341 <div class="formRow">
342 <input type="checkbox" id="autorunOnTorrentAddedCheckbox" onclick="qBittorrent.Preferences.updateAutoRunOnTorrentAdded();">
343 <label id="autorunOnTorrentAddedLabel" for="autorunOnTorrentAddedCheckbox">QBT_TR(Run on torrent added:)QBT_TR[CONTEXT=OptionsDialog]</label>
344 <input type="text" id="autorunOnTorrentAddedProgram" aria-labelledby="autorunOnTorrentAddedLabel" style="width: 400px;">
345 </div>
346 <div class="formRow">
347 <input type="checkbox" id="autorun_checkbox" onclick="qBittorrent.Preferences.updateAutoRun();">
348 <label id="autorunLabel" for="autorun_checkbox">QBT_TR(Run on torrent finished:)QBT_TR[CONTEXT=OptionsDialog]</label>
349 <input type="text" id="autorunProg_txt" aria-labelledby="autorunLabel" style="width: 400px;">
350 </div>
351 <div style="font-style: italic;">QBT_TR(Supported parameters (case sensitive):)QBT_TR[CONTEXT=OptionsDialog]
352 <ul>
353 <li>QBT_TR(%N: Torrent name)QBT_TR[CONTEXT=OptionsDialog]</li>
354 <li>QBT_TR(%L: Category)QBT_TR[CONTEXT=OptionsDialog]</li>
355 <li>QBT_TR(%G: Tags (separated by comma))QBT_TR[CONTEXT=OptionsDialog]</li>
356 <li>QBT_TR(%F: Content path (same as root path for multifile torrent))QBT_TR[CONTEXT=OptionsDialog]</li>
357 <li>QBT_TR(%R: Root path (first torrent subdirectory path))QBT_TR[CONTEXT=OptionsDialog]</li>
358 <li>QBT_TR(%D: Save path)QBT_TR[CONTEXT=OptionsDialog]</li>
359 <li>QBT_TR(%C: Number of files)QBT_TR[CONTEXT=OptionsDialog]</li>
360 <li>QBT_TR(%Z: Torrent size (bytes))QBT_TR[CONTEXT=OptionsDialog]</li>
361 <li>QBT_TR(%T: Current tracker)QBT_TR[CONTEXT=OptionsDialog]</li>
362 <li>QBT_TR(%I: Info hash v1)QBT_TR[CONTEXT=OptionsDialog]</li>
363 <li>QBT_TR(%J: Info hash v2)QBT_TR[CONTEXT=OptionsDialog]</li>
364 <li>QBT_TR(%K: Torrent ID)QBT_TR[CONTEXT=OptionsDialog]</li>
365 </ul>
366 QBT_TR(Tip: Encapsulate parameter with quotation marks to avoid text being cut off at whitespace (e.g., "%N"))QBT_TR[CONTEXT=OptionsDialog]
367 </div>
368 </fieldset>
369 </div>
371 <div id="ConnectionTab" class="PrefTab invisible">
372 <div class="formRow">
373 <label for="enable_protocol_combobox">QBT_TR(Peer connection protocol:)QBT_TR[CONTEXT=OptionsDialog]</label>
374 <select id="enable_protocol_combobox">
375 <option value="0" selected>QBT_TR(TCP and μTP)QBT_TR[CONTEXT=OptionsDialog]</option>
376 <option value="1">TCP</option>
377 <option value="2">μTP</option>
378 </select>
379 </div>
380 <fieldset class="settings">
381 <legend>QBT_TR(Listening Port)QBT_TR[CONTEXT=OptionsDialog]</legend>
382 <div class="formRow">
383 <label for="port_value">QBT_TR(Port used for incoming connections:)QBT_TR[CONTEXT=OptionsDialog]</label>
384 <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]">
385 <button type="button" style="margin-left: 1em;" onclick="qBittorrent.Preferences.generateRandomPort();">QBT_TR(Random)QBT_TR[CONTEXT=OptionsDialog]</button>
386 </div>
387 <div class="formRow">
388 <input type="checkbox" id="upnp_checkbox">
389 <label for="upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP port forwarding from my router)QBT_TR[CONTEXT=OptionsDialog]</label>
390 </div>
391 </fieldset>
393 <fieldset class="settings">
394 <legend>QBT_TR(Connections Limits)QBT_TR[CONTEXT=OptionsDialog]</legend>
395 <table>
396 <tbody>
397 <tr>
398 <td>
399 <input type="checkbox" id="max_connec_checkbox" onclick="qBittorrent.Preferences.updateMaxConnecEnabled();">
400 <label id="maxConnectionsLabel" for="max_connec_checkbox">QBT_TR(Global maximum number of connections:)QBT_TR[CONTEXT=OptionsDialog]</label>
401 </td>
402 <td><input type="text" id="max_connec_value" aria-labelledby="maxConnectionsLabel" style="width: 4em;"></td>
403 </tr>
404 <tr>
405 <td>
406 <input type="checkbox" id="max_connec_per_torrent_checkbox" onclick="qBittorrent.Preferences.updateMaxConnecPerTorrentEnabled();">
407 <label id="maxConnectionsPerTorrentLabel" for="max_connec_per_torrent_checkbox">QBT_TR(Maximum number of connections per torrent:)QBT_TR[CONTEXT=OptionsDialog]</label>
408 </td>
409 <td><input type="text" id="max_connec_per_torrent_value" aria-labelledby="maxConnectionsPerTorrentLabel" style="width: 4em;"></td>
410 </tr>
411 <tr>
412 <td>
413 <input type="checkbox" id="max_uploads_checkbox" onclick="qBittorrent.Preferences.updateMaxUploadsEnabled();">
414 <label id="maxUploadsLabel" for="max_uploads_checkbox">QBT_TR(Global maximum number of upload slots:)QBT_TR[CONTEXT=OptionsDialog]</label>
415 </td>
416 <td><input type="text" id="max_uploads_value" aria-labelledby="maxUploadsLabel" style="width: 4em;"></td>
417 </tr>
418 <tr>
419 <td>
420 <input type="checkbox" id="max_uploads_per_torrent_checkbox" onclick="qBittorrent.Preferences.updateMaxUploadsPerTorrentEnabled();">
421 <label id="maxUploadsPerTorrentLabel" for="max_uploads_per_torrent_checkbox">QBT_TR(Maximum number of upload slots per torrent:)QBT_TR[CONTEXT=OptionsDialog]</label>
422 </td>
423 <td><input type="text" id="max_uploads_per_torrent_value" aria-labelledby="maxUploadsPerTorrentLabel" style="width: 4em;"></td>
424 </tr>
425 </tbody>
426 </table>
427 </fieldset>
429 <fieldset class="settings" id="fieldsetI2p">
430 <legend>
431 <input type="checkbox" id="i2pEnabledCheckbox" onclick="qBittorrent.Preferences.updateI2PSettingsEnabled();">
432 <label for="i2pEnabledCheckbox">QBT_TR(I2P (Experimental))QBT_TR[CONTEXT=OptionsDialog]</label>
433 </legend>
434 <table>
435 <tbody>
436 <tr>
437 <td>
438 <label for="i2pAddress">QBT_TR(Host:)QBT_TR[CONTEXT=OptionsDialog]</label>
439 </td>
440 <td>
441 <input type="text" id="i2pAddress">
442 </td>
443 <td>
444 <label for="i2pPort">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]</label>
445 </td>
446 <td>
447 <input type="number" id="i2pPort" min="0" max="65535" onchange="qBittorrent.Preferences.numberInputLimiter(this);" style="width: 5em;">
448 </td>
449 </tr>
450 </tbody>
451 </table>
452 <div class="formRow">
453 <input type="checkbox" id="i2pMixedMode" title="QBT_TR(If &quot;mixed mode&quot; 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]">
454 <label for="i2pMixedMode">QBT_TR(Mixed mode)QBT_TR[CONTEXT=OptionsDialog]</label>
455 </div>
456 </fieldset>
458 <fieldset class="settings">
459 <legend>QBT_TR(Proxy Server)QBT_TR[CONTEXT=OptionsDialog]</legend>
460 <table>
461 <tbody>
462 <tr>
463 <td>
464 <label for="peer_proxy_type_select">QBT_TR(Type:)QBT_TR[CONTEXT=OptionsDialog]</label>
465 </td>
466 <td>
467 <select id="peer_proxy_type_select" onchange="qBittorrent.Preferences.updatePeerProxySettings();">
468 <option value="None">QBT_TR((None))QBT_TR[CONTEXT=OptionsDialog]</option>
469 <option value="SOCKS4">QBT_TR(SOCKS4)QBT_TR[CONTEXT=OptionsDialog]</option>
470 <option value="SOCKS5">QBT_TR(SOCKS5)QBT_TR[CONTEXT=OptionsDialog]</option>
471 <option value="HTTP">QBT_TR(HTTP)QBT_TR[CONTEXT=OptionsDialog]</option>
472 </select>
473 </td>
474 <td>
475 <label for="peer_proxy_host_text">QBT_TR(Host:)QBT_TR[CONTEXT=OptionsDialog]</label>
476 </td>
477 <td>
478 <input type="text" id="peer_proxy_host_text">
479 </td>
480 <td>
481 <label for="peer_proxy_port_value">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]</label>
482 </td>
483 <td>
484 <input type="text" id="peer_proxy_port_value" style="width: 4em;">
485 </td>
486 </tr>
487 </tbody>
488 </table>
490 <div class="formRow">
491 <input type="checkbox" id="proxyHostnameLookupCheckbox" title="QBT_TR(If checked, hostname lookups are done via the proxy.)QBT_TR[CONTEXT=OptionsDialog]">
492 <label for="proxyHostnameLookupCheckbox">QBT_TR(Perform hostname lookup via proxy)QBT_TR[CONTEXT=OptionsDialog]</label>
493 </div>
495 <fieldset class="settings">
496 <legend>
497 <input type="checkbox" id="peer_proxy_auth_checkbox" onclick="qBittorrent.Preferences.updatePeerProxyAuthSettings();">
498 <label for="peer_proxy_auth_checkbox">QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]</label>
499 </legend>
500 <table>
501 <tbody>
502 <tr>
503 <td>
504 <label for="peer_proxy_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]</label>
505 </td>
506 <td>
507 <input type="text" id="peer_proxy_username_text">
508 </td>
509 </tr>
510 <tr>
511 <td>
512 <label for="peer_proxy_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]</label>
513 </td>
514 <td>
515 <input type="password" id="peer_proxy_password_text">
516 </td>
517 </tr>
518 </tbody>
519 </table>
520 <div class="formRow">
521 <span>QBT_TR(Info: The password is saved unencrypted)QBT_TR[CONTEXT=OptionsDialog]</span>
522 </div>
523 </fieldset>
525 <fieldset class="settings">
526 <legend>
527 <input type="checkbox" id="proxy_bittorrent_checkbox" onclick="qBittorrent.Preferences.updatePeerProxySettings();">
528 <label for="proxy_bittorrent_checkbox">QBT_TR(Use proxy for BitTorrent purposes)QBT_TR[CONTEXT=OptionsDialog]</label>
529 </legend>
530 <div class="formRow">
531 <input type="checkbox" id="use_peer_proxy_checkbox">
532 <label for="use_peer_proxy_checkbox">QBT_TR(Use proxy for peer connections)QBT_TR[CONTEXT=OptionsDialog]</label>
533 </div>
534 </fieldset>
535 <div class="formRow">
536 <input type="checkbox" id="proxy_rss_checkbox">
537 <label for="proxy_rss_checkbox">QBT_TR(Use proxy for RSS purposes)QBT_TR[CONTEXT=OptionsDialog]</label>
538 </div>
539 <div class="formRow">
540 <input type="checkbox" id="proxy_misc_checkbox">
541 <label for="proxy_misc_checkbox">QBT_TR(Use proxy for general purposes)QBT_TR[CONTEXT=OptionsDialog]</label>
542 </div>
543 </fieldset>
545 <fieldset class="settings">
546 <legend>
547 <label>QBT_TR(IP Filtering)QBT_TR[CONTEXT=OptionsDialog]</label>
548 </legend>
549 <div class="formRow">
550 <input type="checkbox" id="ipfilter_text_checkbox" onclick="qBittorrent.Preferences.updateFilterSettings();">
551 <label id="ipfilterTextLabel" for="ipfilter_text_checkbox">QBT_TR(Filter path (.dat, .p2p, .p2b):)QBT_TR[CONTEXT=OptionsDialog]</label>
552 <input type="text" id="ipfilter_text" aria-labelledby="ipfilterTextLabel">
553 </div>
554 <div class="formRow">
555 <input type="checkbox" id="ipfilter_trackers_checkbox">
556 <label for="ipfilter_trackers_checkbox">QBT_TR(Apply to trackers)QBT_TR[CONTEXT=OptionsDialog]</label>
557 </div>
558 <div class="formRow">
559 <fieldset class="settings">
560 <legend id="manuallyBannedIPAddressesLabel">QBT_TR(Manually banned IP addresses...)QBT_TR[CONTEXT=OptionsDialog]</legend>
561 <textarea id="banned_IPs_textarea" aria-labelledby="manuallyBannedIPAddressesLabel" rows="5" cols="70"></textarea>
562 </fieldset>
563 </div>
564 </fieldset>
565 </div>
567 <div id="SpeedTab" class="PrefTab invisible">
568 <fieldset class="settings">
569 <legend>QBT_TR(Global Rate Limits)QBT_TR[CONTEXT=OptionsDialog]</legend>
570 <table>
571 <tbody>
572 <tr>
573 <td rowspan="2">
574 <img src="images/slow_off.svg" style="height: 1.5em;" alt="QBT_TR(Alternative speed limits)QBT_TR[CONTEXT=MainWindow]">
575 </td>
576 <td><label for="up_limit_value">QBT_TR(Upload:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
577 <td><input type="number" id="up_limit_value" style="width: 4em;" min="0">&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]</td>
578 </tr>
579 <tr>
580 <td><label for="dl_limit_value">QBT_TR(Download:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
581 <td><input type="number" id="dl_limit_value" style="width: 4em;" min="0">&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]</td>
582 </tr>
583 </tbody>
584 </table>
585 <i>QBT_TR(0 means unlimited)QBT_TR[CONTEXT=OptionsDialog]</i>
586 </fieldset>
588 <fieldset class="settings">
589 <legend>QBT_TR(Alternative Rate Limits)QBT_TR[CONTEXT=OptionsDialog]</legend>
590 <table>
591 <tbody>
592 <tr>
593 <td rowspan="2">
594 <img src="images/slow.svg" style="height: 1.5em;" alt="QBT_TR(Alternative speed limits)QBT_TR[CONTEXT=MainWindow]">
595 </td>
596 <td><label for="alt_up_limit_value">QBT_TR(Upload:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
597 <td><input type="number" id="alt_up_limit_value" style="width: 4em;" min="0">&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]</td>
598 </tr>
599 <tr>
600 <td><label for="alt_dl_limit_value">QBT_TR(Download:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
601 <td><input type="number" id="alt_dl_limit_value" style="width: 4em;" min="0">&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]</td>
602 </tr>
603 </tbody>
604 </table>
605 <i>QBT_TR(0 means unlimited)QBT_TR[CONTEXT=OptionsDialog]</i>
607 <fieldset class="settings">
608 <legend>
609 <input type="checkbox" id="limitSchedulingCheckbox" onclick="qBittorrent.Preferences.updateSchedulingEnabled();">
610 <label for="limitSchedulingCheckbox">QBT_TR(Schedule the use of alternative rate limits)QBT_TR[CONTEXT=OptionsDialog]</label>
611 </legend>
612 <div class="formRow">
613 <label id="scheduleFromHourLabel">QBT_TR(From:)QBT_TR[CONTEXT=OptionsDialog]</label>
614 <input type="text" id="schedule_from_hour" aria-labelledby="scheduleFromHourLabel" style="width: 1.5em;">:<input type="text" id="schedule_from_min" aria-labelledby="scheduleFromHourLabel" style="width: 1.5em;">
615 <label id="scheduleToHourLabel">QBT_TR(To:)QBT_TR[CONTEXT=OptionsDialog]</label>
616 <input type="text" id="schedule_to_hour" aria-labelledby="scheduleToHourLabel" style="width: 1.5em;">:<input type="text" id="schedule_to_min" aria-labelledby="scheduleToHourLabel" style="width: 1.5em;">
617 </div>
618 <div class="formRow">
619 <label for="schedule_freq_select">QBT_TR(When:)QBT_TR[CONTEXT=OptionsDialog]</label>
620 <select id="schedule_freq_select">
621 <option value="0">QBT_TR(Every day)QBT_TR[CONTEXT=OptionsDialog]</option>
622 <option value="1">QBT_TR(Weekdays)QBT_TR[CONTEXT=OptionsDialog]</option>
623 <option value="2">QBT_TR(Weekends)QBT_TR[CONTEXT=OptionsDialog]</option>
624 <option value="3">QBT_TR(Monday)QBT_TR[CONTEXT=HttpServer]</option>
625 <option value="4">QBT_TR(Tuesday)QBT_TR[CONTEXT=HttpServer]</option>
626 <option value="5">QBT_TR(Wednesday)QBT_TR[CONTEXT=HttpServer]</option>
627 <option value="6">QBT_TR(Thursday)QBT_TR[CONTEXT=HttpServer]</option>
628 <option value="7">QBT_TR(Friday)QBT_TR[CONTEXT=HttpServer]</option>
629 <option value="8">QBT_TR(Saturday)QBT_TR[CONTEXT=HttpServer]</option>
630 <option value="9">QBT_TR(Sunday)QBT_TR[CONTEXT=HttpServer]</option>
631 </select>
632 </div>
633 </fieldset>
634 </fieldset>
636 <fieldset class="settings">
637 <legend>QBT_TR(Rate Limits Settings)QBT_TR[CONTEXT=OptionsDialog]</legend>
638 <div class="formRow">
639 <input type="checkbox" id="limit_utp_rate_checkbox">
640 <label for="limit_utp_rate_checkbox">QBT_TR(Apply rate limit to µTP protocol)QBT_TR[CONTEXT=OptionsDialog]</label>
641 </div>
642 <div class="formRow">
643 <input type="checkbox" id="limit_tcp_overhead_checkbox">
644 <label for="limit_tcp_overhead_checkbox">QBT_TR(Apply rate limit to transport overhead)QBT_TR[CONTEXT=OptionsDialog]</label>
645 </div>
646 <div class="formRow">
647 <input type="checkbox" id="limit_lan_peers_checkbox">
648 <label for="limit_lan_peers_checkbox">QBT_TR(Apply rate limit to peers on LAN)QBT_TR[CONTEXT=OptionsDialog]</label>
649 </div>
650 </fieldset>
651 </div>
653 <div id="BittorrentTab" class="PrefTab invisible">
654 <fieldset class="settings">
655 <legend>QBT_TR(Privacy)QBT_TR[CONTEXT=OptionsDialog]</legend>
656 <div class="formRow">
657 <input type="checkbox" id="dht_checkbox">
658 <label for="dht_checkbox">QBT_TR(Enable DHT (decentralized network) to find more peers)QBT_TR[CONTEXT=OptionsDialog]</label>
659 </div>
660 <div class="formRow">
661 <input type="checkbox" id="pex_checkbox">
662 <label for="pex_checkbox">QBT_TR(Enable Peer Exchange (PeX) to find more peers)QBT_TR[CONTEXT=OptionsDialog]</label>
663 </div>
664 <div class="formRow">
665 <input type="checkbox" id="lsd_checkbox">
666 <label for="lsd_checkbox">QBT_TR(Enable Local Peer Discovery to find more peers)QBT_TR[CONTEXT=OptionsDialog]</label>
667 </div>
668 <div class="formRow">
669 <label for="encryption_select">QBT_TR(Encryption mode:)QBT_TR[CONTEXT=OptionsDialog]</label>
670 <select id="encryption_select">
671 <option value="0">QBT_TR(Allow encryption)QBT_TR[CONTEXT=OptionsDialog]</option>
672 <option value="1">QBT_TR(Require encryption)QBT_TR[CONTEXT=OptionsDialog]</option>
673 <option value="2">QBT_TR(Disable encryption)QBT_TR[CONTEXT=OptionsDialog]</option>
674 </select>
675 </div>
676 <div class="formRow">
677 <input type="checkbox" id="anonymous_mode_checkbox">
678 <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>
679 </div>
680 </fieldset>
682 <div class="formRow">
683 <label for="maxActiveCheckingTorrents">QBT_TR(Max active checking torrents:)QBT_TR[CONTEXT=OptionsDialog]</label>
684 <input type="number" id="maxActiveCheckingTorrents" style="width: 4em;" min="-1">
685 </div>
687 <fieldset class="settings">
688 <legend>
689 <input type="checkbox" id="queueing_checkbox" onclick="qBittorrent.Preferences.updateQueueingSystem();">
690 <label for="queueing_checkbox">QBT_TR(Torrent Queueing)QBT_TR[CONTEXT=OptionsDialog]</label>
691 </legend>
692 <table>
693 <tbody>
694 <tr>
695 <td>
696 <label for="max_active_dl_value">QBT_TR(Maximum active downloads:)QBT_TR[CONTEXT=OptionsDialog]</label>
697 </td>
698 <td>
699 <input type="text" id="max_active_dl_value" style="width: 4em;">
700 </td>
701 </tr>
702 <tr>
703 <td>
704 <label for="max_active_up_value">QBT_TR(Maximum active uploads:)QBT_TR[CONTEXT=OptionsDialog]</label>
705 </td>
706 <td>
707 <input type="text" id="max_active_up_value" style="width: 4em;">
708 </td>
709 </tr>
710 <tr>
711 <td>
712 <label for="max_active_to_value">QBT_TR(Maximum active torrents:)QBT_TR[CONTEXT=OptionsDialog]</label>
713 </td>
714 <td>
715 <input type="text" id="max_active_to_value" style="width: 4em;">
716 </td>
717 </tr>
718 </tbody>
719 </table>
720 <fieldset class="settings">
721 <legend>
722 <input type="checkbox" id="dont_count_slow_torrents_checkbox" onclick="qBittorrent.Preferences.updateSlowTorrentsSettings();">
723 <label for="dont_count_slow_torrents_checkbox">QBT_TR(Do not count slow torrents in these limits)QBT_TR[CONTEXT=OptionsDialog]</label>
724 </legend>
725 <table>
726 <tbody>
727 <tr>
728 <td>
729 <label for="dl_rate_threshold">QBT_TR(Download rate threshold:)QBT_TR[CONTEXT=OptionsDialog]</label>
730 </td>
731 <td>
732 <input type="text" id="dl_rate_threshold" style="width: 4em;">&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
733 </td>
734 </tr>
735 <tr>
736 <td>
737 <label for="ul_rate_threshold">QBT_TR(Upload rate threshold:)QBT_TR[CONTEXT=OptionsDialog]</label>
738 </td>
739 <td>
740 <input type="text" id="ul_rate_threshold" style="width: 4em;">&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
741 </td>
742 </tr>
743 <tr>
744 <td>
745 <label for="torrent_inactive_timer">QBT_TR(Torrent inactivity timer:)QBT_TR[CONTEXT=OptionsDialog]</label>
746 </td>
747 <td>
748 <input type="text" id="torrent_inactive_timer" style="width: 4em;">&nbsp;&nbsp;QBT_TR(seconds)QBT_TR[CONTEXT=OptionsDialog]
749 </td>
750 </tr>
751 </tbody>
752 </table>
753 </fieldset>
754 </fieldset>
756 <fieldset class="settings">
757 <legend>QBT_TR(Seeding Limits)QBT_TR[CONTEXT=OptionsDialog]</legend>
758 <table>
759 <tbody>
760 <tr>
761 <td>
762 <input type="checkbox" id="max_ratio_checkbox" onclick="qBittorrent.Preferences.updateMaxRatioTimeEnabled();">
763 <label id="maxRatioLabel" for="max_ratio_checkbox">QBT_TR(When ratio reaches)QBT_TR[CONTEXT=OptionsDialog]</label>
764 </td>
765 <td>
766 <input type="text" id="max_ratio_value" style="width: 4em;" aria-labelledby="maxRatioLabel">
767 </td>
768 </tr>
769 <tr>
770 <td>
771 <input type="checkbox" id="max_seeding_time_checkbox" onclick="qBittorrent.Preferences.updateMaxRatioTimeEnabled();">
772 <label id="maxSeedingTimeLabel" for="max_seeding_time_checkbox">QBT_TR(When total seeding time reaches)QBT_TR[CONTEXT=OptionsDialog]</label>
773 </td>
774 <td>
775 <input type="text" id="max_seeding_time_value" style="width: 4em;" aria-labelledby="maxSeedingTimeLabel">QBT_TR(minutes)QBT_TR[CONTEXT=OptionsDialog]
776 </td>
777 </tr>
778 <tr>
779 <td>
780 <input type="checkbox" id="max_inactive_seeding_time_checkbox" onclick="qBittorrent.Preferences.updateMaxRatioTimeEnabled();">
781 <label id="maxInactiveSeedingTimeLabel" for="max_inactive_seeding_time_checkbox">QBT_TR(When inactive seeding time reaches)QBT_TR[CONTEXT=OptionsDialog]</label>
782 </td>
783 <td>
784 <input type="text" id="max_inactive_seeding_time_value" style="width: 4em;" aria-labelledby="maxInactiveSeedingTimeLabel">QBT_TR(minutes)QBT_TR[CONTEXT=OptionsDialog]
785 </td>
786 </tr>
787 <tr>
788 <td style="text-align: right;"><label for="max_ratio_act">QBT_TR(then)QBT_TR[CONTEXT=OptionsDialog]</label></td>
789 <td>
790 <select id="max_ratio_act">
791 <option value="0">QBT_TR(Stop torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
792 <option value="1">QBT_TR(Remove torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
793 <option value="3">QBT_TR(Remove torrent and its files)QBT_TR[CONTEXT=OptionsDialog]</option>
794 <option value="2">QBT_TR(Enable super seeding for torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
795 </select>
796 </td>
797 </tr>
798 </tbody>
799 </table>
800 </fieldset>
802 <fieldset class="settings">
803 <legend>
804 <input type="checkbox" id="add_trackers_checkbox" onclick="qBittorrent.Preferences.updateAddTrackersEnabled();">
805 <label id="addTrackersLabel" for="add_trackers_checkbox">QBT_TR(Automatically append these trackers to new downloads:)QBT_TR[CONTEXT=OptionsDialog]</label>
806 </legend>
807 <textarea id="add_trackers_textarea" rows="5" cols="70" aria-labelledby="addTrackersLabel"></textarea>
808 </fieldset>
809 </div>
811 <div id="RSSTab" class="PrefTab invisible">
812 <fieldset class="settings">
813 <legend>QBT_TR(RSS Reader)QBT_TR[CONTEXT=OptionsDialog]</legend>
814 <div class="formRow">
815 <input type="checkbox" id="enable_fetching_rss_feeds_checkbox">
816 <label for="enable_fetching_rss_feeds_checkbox">QBT_TR(Enable fetching RSS feeds)QBT_TR[CONTEXT=OptionsDialog]</label>
817 </div>
818 <table>
819 <tbody>
820 <tr>
821 <td>
822 <label for="feed_refresh_interval">QBT_TR(Feeds refresh interval:)QBT_TR[CONTEXT=OptionsDialog]</label>
823 </td>
824 <td>
825 <input type="text" id="feed_refresh_interval" style="width: 4em;">&nbsp;&nbsp;QBT_TR( min)QBT_TR[CONTEXT=OptionsDialog]
826 </td>
827 </tr>
828 <tr>
829 <td>
830 <label for="feedFetchDelay">QBT_TR(Same host request delay:)QBT_TR[CONTEXT=OptionsDialog]</label>
831 </td>
832 <td>
833 <input type="text" id="feedFetchDelay" style="width: 4em;">&nbsp;&nbsp;QBT_TR( sec)QBT_TR[CONTEXT=OptionsDialog]
834 </td>
835 </tr>
836 <tr>
837 <td>
838 <label for="maximum_article_number">QBT_TR(Maximum number of articles per feed:)QBT_TR[CONTEXT=OptionsDialog]</label>
839 </td>
840 <td>
841 <input type="text" id="maximum_article_number" style="width: 4em;">
842 </td>
843 </tr>
844 </tbody>
845 </table>
846 </fieldset>
848 <fieldset class="settings">
849 <legend>QBT_TR(RSS Torrent Auto Downloader)QBT_TR[CONTEXT=OptionsDialog]</legend>
850 <div class="formRow">
851 <input type="checkbox" id="enable_auto_downloading_rss_torrents_checkbox">
852 <label for="enable_auto_downloading_rss_torrents_checkbox">QBT_TR(Enable auto downloading of RSS torrents)QBT_TR[CONTEXT=OptionsDialog]</label>
853 </div>
854 <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>
855 </fieldset>
857 <fieldset class="settings">
858 <legend>QBT_TR(RSS Smart Episode Filter)QBT_TR[CONTEXT=OptionsDialog]</legend>
859 <div class="formRow">
860 <input type="checkbox" id="downlock_repack_proper_episodes">
862 <label for="downlock_repack_proper_episodes">QBT_TR(Download REPACK/PROPER episodes)QBT_TR[CONTEXT=OptionsDialog]</label>
863 </div>
864 <label for="rss_filter_textarea">QBT_TR(Filters:)QBT_TR[CONTEXT=OptionsDialog]</label><br>
865 <textarea id="rss_filter_textarea" rows="6" cols="70"></textarea>
866 </fieldset>
867 </div>
869 <div id="WebUITab" class="PrefTab invisible">
870 <fieldset class="settings">
871 <legend>QBT_TR(Web User Interface (Remote control))QBT_TR[CONTEXT=OptionsDialog]</legend>
872 <table>
873 <tbody>
874 <tr>
875 <td>
876 <label for="webui_address_value">QBT_TR(IP address:)QBT_TR[CONTEXT=OptionsDialog]</label>
877 </td>
878 <td>
879 <input type="text" id="webui_address_value">
880 <label for="webui_port_value" style="margin-left: 10px;">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]</label>
881 <input type="text" id="webui_port_value" style="width: 4em;">
882 </td>
883 </tr>
884 </tbody>
885 </table>
886 <div class="formRow">
887 <input type="checkbox" id="webui_upnp_checkbox">
888 <label for="webui_upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP to forward the port from my router)QBT_TR[CONTEXT=OptionsDialog]</label>
889 </div>
890 <fieldset class="settings">
891 <legend>
892 <input type="checkbox" id="use_https_checkbox" onclick="qBittorrent.Preferences.updateHttpsSettings();">
893 <label for="use_https_checkbox">QBT_TR(Use HTTPS instead of HTTP)QBT_TR[CONTEXT=OptionsDialog]</label>
894 </legend>
895 <table>
896 <tbody>
897 <tr>
898 <td>
899 <label for="ssl_cert_text">QBT_TR(Certificate:)QBT_TR[CONTEXT=OptionsDialog]</label>
900 </td>
901 <td>
902 <input type="text" id="ssl_cert_text" class="pathFile" style="width: 30em;">
903 </td>
904 </tr>
905 <tr>
906 <td>
907 <label for="ssl_key_text">QBT_TR(Key:)QBT_TR[CONTEXT=OptionsDialog]</label>
908 </td>
909 <td>
910 <input type="text" id="ssl_key_text" class="pathFile" style="width: 30em;">
911 </td>
912 </tr>
913 </tbody>
914 </table>
915 <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>
916 </fieldset>
918 <fieldset class="settings">
919 <legend>QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]</legend>
920 <table>
921 <tbody>
922 <tr>
923 <td>
924 <label for="webui_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]</label>
925 </td>
926 <td>
927 <input type="text" id="webui_username_text">
928 </td>
929 </tr>
930 <tr>
931 <td>
932 <label for="webui_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]</label>
933 </td>
934 <td>
935 <input type="password" id="webui_password_text" placeholder="QBT_TR(Change current password)QBT_TR[CONTEXT=OptionsDialog]" autocomplete="new-password">
936 </td>
937 </tr>
938 </tbody>
939 </table>
940 <div class="formRow">
941 <input type="checkbox" id="bypass_local_auth_checkbox">
942 <label for="bypass_local_auth_checkbox">QBT_TR(Bypass authentication for clients on localhost)QBT_TR[CONTEXT=OptionsDialog]</label>
943 </div>
944 <div class="formRow">
945 <input type="checkbox" id="bypass_auth_subnet_whitelist_checkbox" onclick="qBittorrent.Preferences.updateBypasssAuthSettings();">
946 <label id="bypassAuthSubnetWhitelistLabel" for="bypass_auth_subnet_whitelist_checkbox">QBT_TR(Bypass authentication for clients in whitelisted IP subnets)QBT_TR[CONTEXT=OptionsDialog]</label>
947 </div>
948 <div class="formRow" style="padding-left: 30px; padding-top: 5px;">
949 <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]" aria-labelledby="bypassAuthSubnetWhitelistLabel"></textarea>
950 </div>
951 <table>
952 <tbody>
953 <tr>
954 <td><label for="webUIMaxAuthFailCountInput">QBT_TR(Ban client after consecutive failures:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
955 <td><input type="number" id="webUIMaxAuthFailCountInput" style="width: 4em;" min="0"></td>
956 </tr>
957 <tr>
958 <td style="text-align: right;"><label for="webUIBanDurationInput">QBT_TR(ban for:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
959 <td><input type="number" id="webUIBanDurationInput" style="width: 4em;" min="1">QBT_TR(seconds)QBT_TR[CONTEXT=OptionsDialog]</td>
960 </tr>
961 </tbody>
962 </table>
963 <table>
964 <tbody>
965 <tr>
966 <td><label for="webUISessionTimeoutInput">QBT_TR(Session timeout:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
967 <td><input type="number" id="webUISessionTimeoutInput" style="width: 4em;" min="0">&nbsp;&nbsp;QBT_TR(seconds)QBT_TR[CONTEXT=OptionsDialog]</td>
968 </tr>
969 </tbody>
970 </table>
971 </fieldset>
973 <fieldset class="settings">
974 <legend><input type="checkbox" id="use_alt_webui_checkbox" onclick="qBittorrent.Preferences.updateAlternativeWebUISettings();">
975 <label for="use_alt_webui_checkbox">QBT_TR(Use alternative WebUI)QBT_TR[CONTEXT=OptionsDialog]</label>
976 </legend>
977 <div class="formRow">
978 <label for="webui_files_location_textarea">QBT_TR(Files location:)QBT_TR[CONTEXT=OptionsDialog]</label>
979 <input type="text" id="webui_files_location_textarea" class="pathDirectory">
980 </div>
981 <div class="formRow">
982 <a href="https://github.com/qbittorrent/qBittorrent/wiki/List-of-known-alternate-WebUIs" target="_blank">QBT_TR(List of alternative WebUI)QBT_TR[CONTEXT=OptionsDialog]</a>
983 </div>
984 </fieldset>
986 <fieldset class="settings">
987 <legend>QBT_TR(Security)QBT_TR[CONTEXT=OptionsDialog]</legend>
988 <div class="formRow">
989 <input type="checkbox" id="clickjacking_protection_checkbox">
990 <label for="clickjacking_protection_checkbox">QBT_TR(Enable clickjacking protection)QBT_TR[CONTEXT=OptionsDialog]</label>
991 </div>
992 <div class="formRow">
993 <input type="checkbox" id="csrf_protection_checkbox">
994 <label for="csrf_protection_checkbox">QBT_TR(Enable Cross-Site Request Forgery (CSRF) protection)QBT_TR[CONTEXT=OptionsDialog]</label>
995 </div>
996 <div class="formRow">
997 <input type="checkbox" id="secureCookieCheckbox">
998 <label for="secureCookieCheckbox">QBT_TR(Enable cookie Secure flag (requires HTTPS or localhost connection))QBT_TR[CONTEXT=OptionsDialog]</label>
999 </div>
1001 <fieldset class="settings">
1002 <legend>
1003 <input type="checkbox" id="host_header_validation_checkbox" onclick="qBittorrent.Preferences.updateHostHeaderValidationSettings();">
1004 <label for="host_header_validation_checkbox">QBT_TR(Enable Host header validation)QBT_TR[CONTEXT=OptionsDialog]</label>
1005 </legend>
1006 <table>
1007 <tbody>
1008 <tr>
1009 <td>
1010 <label for="webui_domain_textarea">QBT_TR(Server domains:)QBT_TR[CONTEXT=OptionsDialog]</label>
1011 </td>
1012 <td>
1013 <textarea id="webui_domain_textarea" rows="1" cols="60" title="QBT_TR(Whitelist for filtering HTTP Host header values.
1014 In order to defend against DNS rebinding attack,
1015 you should put in domain names used by WebUI server.
1017 Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsDialog]"></textarea>
1018 </td>
1019 </tr>
1020 </tbody>
1021 </table>
1022 </fieldset>
1023 </fieldset>
1025 <fieldset class="settings">
1026 <legend>
1027 <input type="checkbox" id="webUIUseCustomHTTPHeadersCheckbox" onclick="qBittorrent.Preferences.updateWebUICustomHTTPHeadersSettings();">
1028 <label id="webUIUseCustomHTTPHeadersLabel" for="webUIUseCustomHTTPHeadersCheckbox">QBT_TR(Add custom HTTP headers)QBT_TR[CONTEXT=OptionsDialog]</label>
1029 </legend>
1030 <textarea id="webUICustomHTTPHeadersTextarea" placeholder="QBT_TR(Header: value pairs, one per line)QBT_TR[CONTEXT=OptionsDialog]" aria-labelledby="webUIUseCustomHTTPHeadersLabel" style="width: 90%;"></textarea>
1031 </fieldset>
1033 <fieldset class="settings">
1034 <legend>
1035 <input type="checkbox" id="webUIReverseProxySupportCheckbox" onclick="qBittorrent.Preferences.updateWebUIReverseProxySettings();">
1036 <label for="webUIReverseProxySupportCheckbox">QBT_TR(Enable reverse proxy support)QBT_TR[CONTEXT=OptionsDialog]</label>
1037 </legend>
1038 <div class="formRow">
1039 <label for="webUIReverseProxiesListTextarea">QBT_TR(Trusted proxies list:)QBT_TR[CONTEXT=OptionsDialog]</label>
1040 <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]">
1041 </div>
1042 <div class="formRow">
1043 <a href="https://github.com/qbittorrent/qBittorrent/wiki#reverse-proxy-setup-for-webui-access" target="_blank">QBT_TR(Reverse proxy setup examples)QBT_TR[CONTEXT=HttpServer]</a>
1044 </div>
1045 </fieldset>
1047 </fieldset>
1049 <fieldset class="settings">
1050 <legend>
1051 <input type="checkbox" id="use_dyndns_checkbox" onclick="qBittorrent.Preferences.updateDynDnsSettings();">
1052 <label id="UseDyndnsLabel" for="use_dyndns_checkbox">QBT_TR(Update my dynamic domain name)QBT_TR[CONTEXT=OptionsDialog]</label>
1053 </legend>
1054 <select id="dyndns_select" aria-labelledby="UseDyndnsLabel">
1055 <option value="0">DynDNS</option>
1056 <option value="1">NO-IP</option>
1057 </select>
1058 <input type="button" value="QBT_TR(Register)QBT_TR[CONTEXT=OptionsDialog]" onclick="qBittorrent.Preferences.registerDynDns();">
1059 <table style="margin-top: 10px;">
1060 <tbody>
1061 <tr>
1062 <td>
1063 <label for="dyndns_domain_text">QBT_TR(Domain name:)QBT_TR[CONTEXT=OptionsDialog]</label>
1064 </td>
1065 <td>
1066 <input type="text" id="dyndns_domain_text">
1067 </td>
1068 </tr>
1069 <tr>
1070 <td>
1071 <label for="dyndns_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]</label>
1072 </td>
1073 <td>
1074 <input type="text" id="dyndns_username_text">
1075 </td>
1076 </tr>
1077 <tr>
1078 <td>
1079 <label for="dyndns_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]</label>
1080 </td>
1081 <td>
1082 <input type="password" id="dyndns_password_text">
1083 </td>
1084 </tr>
1085 </tbody>
1086 </table>
1087 </fieldset>
1088 </div>
1090 <div id="AdvancedTab" class="PrefTab invisible">
1091 <fieldset class="settings">
1092 <legend>QBT_TR(qBittorrent Section)QBT_TR[CONTEXT=OptionsDialog]&nbsp;(<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>
1093 <table>
1094 <tbody>
1095 <tr>
1096 <td>
1097 <label for="resumeDataStorageType">QBT_TR(Resume data storage type (requires restart):)QBT_TR[CONTEXT=OptionsDialog]</label>
1098 </td>
1099 <td>
1100 <select id="resumeDataStorageType" style="width: 15em;">
1101 <option value="Legacy">QBT_TR(Fastresume files)QBT_TR[CONTEXT=OptionsDialog]</option>
1102 <option value="SQLite">QBT_TR(SQLite database (experimental))QBT_TR[CONTEXT=OptionsDialog]</option>
1103 </select>
1104 </td>
1105 </tr>
1106 <tr id="rowMemoryWorkingSetLimit">
1107 <td>
1108 <label for="torrentContentRemoveOption">QBT_TR(Torrent content removing mode:)QBT_TR[CONTEXT=OptionsDialog]</label>
1109 </td>
1110 <td>
1111 <select id="torrentContentRemoveOption" style="width: 15em;">
1112 <option value="Delete">QBT_TR(Delete files permanently)QBT_TR[CONTEXT=OptionsDialog]</option>
1113 <option value="MoveToTrash">QBT_TR(Move files to trash (if possible))QBT_TR[CONTEXT=OptionsDialog]</option>
1114 </select>
1115 </td>
1116 </tr>
1117 <tr>
1118 <td>
1119 <label for="memoryWorkingSetLimit">QBT_TR(Physical memory (RAM) usage limit:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://wikipedia.org/wiki/Working_set" target="_blank">(?)</a></label>
1120 </td>
1121 <td>
1122 <input type="text" id="memoryWorkingSetLimit" style="width: 15em;" title="QBT_TR(This option is less effective on Linux)QBT_TR[CONTEXT=OptionsDialog]">&nbsp;&nbsp;QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
1123 </td>
1124 </tr>
1125 <tr>
1126 <td>
1127 <label for="networkInterface">QBT_TR(Network interface:)QBT_TR[CONTEXT=OptionsDialog]</label>
1128 </td>
1129 <td>
1130 <select id="networkInterface" style="width: 15em;">
1131 </select>
1132 </td>
1133 </tr>
1134 <tr>
1135 <td>
1136 <label for="optionalIPAddressToBind">QBT_TR(Optional IP address to bind to:)QBT_TR[CONTEXT=OptionsDialog]</label>
1137 </td>
1138 <td>
1139 <select id="optionalIPAddressToBind" style="width: 15em;">
1140 </select>
1141 </td>
1142 </tr>
1143 <tr>
1144 <td>
1145 <label for="saveResumeDataInterval">QBT_TR(Save resume data interval:)QBT_TR[CONTEXT=OptionsDialog]</label>
1146 </td>
1147 <td>
1148 <input type="text" id="saveResumeDataInterval" style="width: 15em;">&nbsp;&nbsp;QBT_TR(min)QBT_TR[CONTEXT=OptionsDialog]
1149 </td>
1150 </tr>
1151 <tr>
1152 <td>
1153 <label for="torrentFileSizeLimit">QBT_TR(.torrent file size limit:)QBT_TR[CONTEXT=OptionsDialog]</label>
1154 </td>
1155 <td>
1156 <input type="text" id="torrentFileSizeLimit" style="width: 15em;">&nbsp;&nbsp;QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
1157 </td>
1158 </tr>
1159 <tr>
1160 <td>
1161 <label for="recheckTorrentsOnCompletion">QBT_TR(Recheck torrents on completion:)QBT_TR[CONTEXT=OptionsDialog]</label>
1162 </td>
1163 <td>
1164 <input type="checkbox" id="recheckTorrentsOnCompletion">
1165 </td>
1166 </tr>
1167 <tr>
1168 <td>
1169 <label for="appInstanceName">QBT_TR(Customize application instance name:)QBT_TR[CONTEXT=OptionsDialog]</label>
1170 </td>
1171 <td>
1172 <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]">
1173 </td>
1174 </tr>
1175 <tr>
1176 <td>
1177 <label for="refreshInterval">QBT_TR(Refresh interval:)QBT_TR[CONTEXT=OptionsDialog]</label>
1178 </td>
1179 <td>
1180 <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]">&nbsp;&nbsp;QBT_TR(ms)QBT_TR[CONTEXT=OptionsDialog]
1181 </td>
1182 </tr>
1183 <tr>
1184 <td>
1185 <label for="resolvePeerCountries">QBT_TR(Resolve peer countries:)QBT_TR[CONTEXT=OptionsDialog]</label>
1186 </td>
1187 <td>
1188 <input type="checkbox" id="resolvePeerCountries">
1189 </td>
1190 </tr>
1191 <tr>
1192 <td>
1193 <label for="reannounceWhenAddressChanged">QBT_TR(Reannounce to all trackers when IP or port changed:)QBT_TR[CONTEXT=OptionsDialog]</label>
1194 </td>
1195 <td>
1196 <input type="checkbox" id="reannounceWhenAddressChanged">
1197 </td>
1198 </tr>
1199 <tr>
1200 <td>
1201 <label for="enableEmbeddedTracker">QBT_TR(Enable embedded tracker:)QBT_TR[CONTEXT=OptionsDialog]</label>
1202 </td>
1203 <td>
1204 <input type="checkbox" id="enableEmbeddedTracker">
1205 </td>
1206 </tr>
1207 <tr>
1208 <td>
1209 <label for="embeddedTrackerPort">QBT_TR(Embedded tracker port:)QBT_TR[CONTEXT=OptionsDialog]</label>
1210 </td>
1211 <td>
1212 <input type="text" id="embeddedTrackerPort" style="width: 15em;">
1213 </td>
1214 </tr>
1215 <tr>
1216 <td>
1217 <label for="embeddedTrackerPortForwarding">QBT_TR(Enable port forwarding for embedded tracker:)QBT_TR[CONTEXT=OptionsDialog]</label>
1218 </td>
1219 <td>
1220 <input type="checkbox" id="embeddedTrackerPortForwarding">
1221 </td>
1222 </tr>
1223 <tr id="rowMarkOfTheWeb">
1224 <td>
1225 <label for="markOfTheWeb">QBT_TR(Enable Mark-of-the-Web (MOTW) for downloaded files (require macOS or Windows):)QBT_TR[CONTEXT=OptionsDialog]</label>
1226 </td>
1227 <td>
1228 <input type="checkbox" id="markOfTheWeb">
1229 </td>
1230 </tr>
1231 <tr>
1232 <td>
1233 <label for="pythonExecutablePath">QBT_TR(Python executable path (may require restart):)QBT_TR[CONTEXT=OptionsDialog]</label>
1234 </td>
1235 <td>
1236 <input type="text" id="pythonExecutablePath" class="pathFile" placeholder="QBT_TR((Auto detect if empty))QBT_TR[CONTEXT=OptionsDialog]" style="width: 15em;">
1237 </td>
1238 </tr>
1239 </tbody>
1240 </table>
1241 </fieldset>
1242 <fieldset class="settings">
1243 <legend>QBT_TR(libtorrent Section)QBT_TR[CONTEXT=OptionsDialog]&nbsp;(<a href="https://www.libtorrent.org/reference-Settings.html" target="_blank">QBT_TR(Open documentation)QBT_TR[CONTEXT=HttpServer]</a>)</legend>
1244 <table>
1245 <tbody>
1246 <tr>
1247 <td>
1248 <label for="bdecodeDepthLimit">QBT_TR(Bdecode depth limit:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Bdecoding.html#bdecode()" target="_blank">(?)</a></label>
1249 </td>
1250 <td>
1251 <input type="text" id="bdecodeDepthLimit" style="width: 15em;">
1252 </td>
1253 </tr>
1254 <tr>
1255 <td>
1256 <label for="bdecodeTokenLimit">QBT_TR(Bdecode token limit:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Bdecoding.html#bdecode()" target="_blank">(?)</a></label>
1257 </td>
1258 <td>
1259 <input type="text" id="bdecodeTokenLimit" style="width: 15em;">
1260 </td>
1261 </tr>
1262 <tr>
1263 <td>
1264 <label for="asyncIOThreads">QBT_TR(Asynchronous I/O threads:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#aio_threads" target="_blank">(?)</a></label>
1265 </td>
1266 <td>
1267 <input type="text" id="asyncIOThreads" style="width: 15em;">
1268 </td>
1269 </tr>
1270 <tr id="rowHashingThreads">
1271 <td>
1272 <label for="hashingThreads">QBT_TR(Hashing threads:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#hashing_threads" target="_blank">(?)</a></label>
1273 </td>
1274 <td>
1275 <input type="text" id="hashingThreads" style="width: 15em;">
1276 </td>
1277 </tr>
1278 <tr>
1279 <td>
1280 <label for="filePoolSize">QBT_TR(File pool size:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#file_pool_size" target="_blank">(?)</a></label>
1281 </td>
1282 <td>
1283 <input type="text" id="filePoolSize" style="width: 15em;">
1284 </td>
1285 </tr>
1286 <tr>
1287 <td>
1288 <label for="outstandMemoryWhenCheckingTorrents">QBT_TR(Outstanding memory when checking torrents:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#checking_mem_usage" target="_blank">(?)</a></label>
1289 </td>
1290 <td>
1291 <input type="text" id="outstandMemoryWhenCheckingTorrents" style="width: 15em;">&nbsp;&nbsp;QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
1292 </td>
1293 </tr>
1294 <tr id="rowDiskCache">
1295 <td>
1296 <label for="diskCache">QBT_TR(Disk cache:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#cache_size" target="_blank">(?)</a></label>
1297 </td>
1298 <td>
1299 <input type="text" id="diskCache" style="width: 15em;">&nbsp;&nbsp;QBT_TR(MiB)QBT_TR[CONTEXT=OptionsDialog]
1300 </td>
1301 </tr>
1302 <tr id="rowDiskCacheExpiryInterval">
1303 <td>
1304 <label for="diskCacheExpiryInterval">QBT_TR(Disk cache expiry interval:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#cache_expiry" target="_blank">(?)</a></label>
1305 </td>
1306 <td>
1307 <input type="text" id="diskCacheExpiryInterval" style="width: 15em;">&nbsp;&nbsp;QBT_TR(s)QBT_TR[CONTEXT=OptionsDialog]
1308 </td>
1309 </tr>
1310 <tr>
1311 <td>
1312 <label for="diskQueueSize">QBT_TR(Disk queue size:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes" target="_blank">(?)</a></label>
1313 </td>
1314 <td>
1315 <input type="text" id="diskQueueSize" style="width: 15em;">&nbsp;&nbsp;QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
1316 </td>
1317 </tr>
1318 <tr id="rowDiskIOType">
1319 <td>
1320 <label for="diskIOType">QBT_TR(Disk IO type (requires restart):)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/single-page-ref.html#default-disk-io-constructor" target="_blank">(?)</a></label>
1321 </td>
1322 <td>
1323 <select id="diskIOType" style="width: 15em;">
1324 <option value="0">QBT_TR(Default)QBT_TR[CONTEXT=OptionsDialog]</option>
1325 <option value="1">QBT_TR(Memory mapped files)QBT_TR[CONTEXT=OptionsDialog]</option>
1326 <option value="2">QBT_TR(POSIX-compliant)QBT_TR[CONTEXT=OptionsDialog]</option>
1327 </select>
1328 </td>
1329 </tr>
1330 <tr>
1331 <td>
1332 <label for="diskIOReadMode">QBT_TR(Disk IO read mode:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#disk_io_read_mode" target="_blank">(?)</a></label>
1333 </td>
1334 <td>
1335 <select id="diskIOReadMode" style="width: 15em;">
1336 <option value="0">QBT_TR(Disable OS cache)QBT_TR[CONTEXT=OptionsDialog]</option>
1337 <option value="1">QBT_TR(Enable OS cache)QBT_TR[CONTEXT=OptionsDialog]</option>
1338 </select>
1339 </td>
1340 </tr>
1341 <tr>
1342 <td>
1343 <label for="diskIOWriteMode">QBT_TR(Disk IO write mode:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode" target="_blank">(?)</a></label>
1344 </td>
1345 <td>
1346 <select id="diskIOWriteMode" style="width: 15em;">
1347 <option value="0">QBT_TR(Disable OS cache)QBT_TR[CONTEXT=OptionsDialog]</option>
1348 <option value="1">QBT_TR(Enable OS cache)QBT_TR[CONTEXT=OptionsDialog]</option>
1349 <option value="2" id="diskIOWriteModeWriteThrough">QBT_TR(Write-through)QBT_TR[CONTEXT=OptionsDialog]</option>
1350 </select>
1351 </td>
1352 </tr>
1353 <tr id="rowCoalesceReadsAndWrites">
1354 <td>
1355 <label for="coalesceReadsAndWrites">QBT_TR(Coalesce reads &amp; writes:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#coalesce_reads" target="_blank">(?)</a></label>
1356 </td>
1357 <td>
1358 <input type="checkbox" id="coalesceReadsAndWrites">
1359 </td>
1360 </tr>
1361 <tr>
1362 <td>
1363 <label for="pieceExtentAffinity">QBT_TR(Use piece extent affinity:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://libtorrent.org/single-page-ref.html#piece_extent_affinity" target="_blank">(?)</a></label>
1364 </td>
1365 <td>
1366 <input type="checkbox" id="pieceExtentAffinity">
1367 </td>
1368 </tr>
1369 <tr>
1370 <td>
1371 <label for="sendUploadPieceSuggestions">QBT_TR(Send upload piece suggestions:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#suggest_mode" target="_blank">(?)</a></label>
1372 </td>
1373 <td>
1374 <input type="checkbox" id="sendUploadPieceSuggestions">
1375 </td>
1376 </tr>
1377 <tr>
1378 <td>
1379 <label for="sendBufferWatermark">QBT_TR(Send buffer watermark:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark" target="_blank">(?)</a></label>
1380 </td>
1381 <td>
1382 <input type="text" id="sendBufferWatermark" style="width: 15em;">&nbsp;&nbsp;QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
1383 </td>
1384 </tr>
1385 <tr>
1386 <td>
1387 <label for="sendBufferLowWatermark">QBT_TR(Send buffer low watermark:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#send_buffer_low_watermark" target="_blank">(?)</a></label>
1388 </td>
1389 <td>
1390 <input type="text" id="sendBufferLowWatermark" style="width: 15em;">&nbsp;&nbsp;QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
1391 </td>
1392 </tr>
1393 <tr>
1394 <td>
1395 <label for="sendBufferWatermarkFactor">QBT_TR(Send buffer watermark factor:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark_factor" target="_blank">(?)</a></label>
1396 </td>
1397 <td>
1398 <input type="text" id="sendBufferWatermarkFactor" style="width: 15em;">&nbsp;&nbsp;%
1399 </td>
1400 </tr>
1401 <tr>
1402 <td>
1403 <label for="connectionSpeed">QBT_TR(Outgoing connections per second:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#connection_speed" target="_blank">(?)</a></label>
1404 </td>
1405 <td>
1406 <input type="text" id="connectionSpeed" style="width: 15em;">
1407 </td>
1408 </tr>
1409 <tr>
1410 <td>
1411 <label for="socketSendBufferSize">QBT_TR(Socket send buffer size [0: system default]:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#send_socket_buffer_size" target="_blank">(?)</a></label>
1412 </td>
1413 <td>
1414 <input type="text" id="socketSendBufferSize" style="width: 15em;">&nbsp;&nbsp;QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
1415 </td>
1416 </tr>
1417 <tr>
1418 <td>
1419 <label for="socketReceiveBufferSize">QBT_TR(Socket receive buffer size [0: system default]:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#recv_socket_buffer_size" target="_blank">(?)</a></label>
1420 </td>
1421 <td>
1422 <input type="text" id="socketReceiveBufferSize" style="width: 15em;">&nbsp;&nbsp;QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
1423 </td>
1424 </tr>
1425 <tr>
1426 <td>
1427 <label for="socketBacklogSize">QBT_TR(Socket backlog size:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#listen_queue_size" target="_blank">(?)</a></label>
1428 </td>
1429 <td>
1430 <input type="text" id="socketBacklogSize" style="width: 15em;">
1431 </td>
1432 </tr>
1433 <tr>
1434 <td>
1435 <label for="outgoingPortsMin">QBT_TR(Outgoing ports (Min) [0: disabled]:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#outgoing_port" target="_blank">(?)</a></label>
1436 </td>
1437 <td>
1438 <input type="text" id="outgoingPortsMin" style="width: 15em;">
1439 </td>
1440 </tr>
1441 <tr>
1442 <td>
1443 <label for="outgoingPortsMax">QBT_TR(Outgoing ports (Max) [0: disabled]:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#outgoing_port" target="_blank">(?)</a></label>
1444 </td>
1445 <td>
1446 <input type="text" id="outgoingPortsMax" style="width: 15em;">
1447 </td>
1448 </tr>
1449 <tr>
1450 <td>
1451 <label for="UPnPLeaseDuration">QBT_TR(UPnP lease duration [0: permanent lease]:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#upnp_lease_duration" target="_blank">(?)</a></label>
1452 </td>
1453 <td>
1454 <input type="text" id="UPnPLeaseDuration" style="width: 15em;">
1455 </td>
1456 </tr>
1457 <tr>
1458 <td>
1459 <label for="peerToS">QBT_TR(Type of service (ToS) for connections to peers)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#peer_tos" target="_blank">(?)</a></label>
1460 </td>
1461 <td>
1462 <input type="text" id="peerToS" style="width: 15em;">
1463 </td>
1464 </tr>
1465 <tr>
1466 <td>
1467 <label for="utpTCPMixedModeAlgorithm">QBT_TR(μTP-TCP mixed mode algorithm:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#mixed_mode_algorithm" target="_blank">(?)</a></label>
1468 </td>
1469 <td>
1470 <select id="utpTCPMixedModeAlgorithm" style="width: 15em;">
1471 <option value="0">QBT_TR(Prefer TCP)QBT_TR[CONTEXT=OptionsDialog]</option>
1472 <option value="1">QBT_TR(Peer proportional (throttles TCP))QBT_TR[CONTEXT=OptionsDialog]</option>
1473 </select>
1474 </td>
1475 </tr>
1476 <tr>
1477 <td>
1478 <label for="IDNSupportCheckbox">QBT_TR(Support internationalized domain name (IDN):)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#allow_idna" target="_blank">(?)</a></label>
1479 </td>
1480 <td>
1481 <input type="checkbox" id="IDNSupportCheckbox">
1482 </td>
1483 </tr>
1484 <tr>
1485 <td>
1486 <label for="allowMultipleConnectionsFromTheSameIPAddress">QBT_TR(Allow multiple connections from the same IP address:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#allow_multiple_connections_per_ip" target="_blank">(?)</a></label>
1487 </td>
1488 <td>
1489 <input type="checkbox" id="allowMultipleConnectionsFromTheSameIPAddress">
1490 </td>
1491 </tr>
1492 <tr>
1493 <td>
1494 <label for="validateHTTPSTrackerCertificate">QBT_TR(Validate HTTPS tracker certificate:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#validate_https_trackers" target="_blank">(?)</a></label>
1495 </td>
1496 <td>
1497 <input type="checkbox" id="validateHTTPSTrackerCertificate">
1498 </td>
1499 </tr>
1500 <tr>
1501 <td>
1502 <label for="mitigateSSRF">QBT_TR(Server-side request forgery (SSRF) mitigation:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#ssrf_mitigation" target="_blank">(?)</a></label>
1503 </td>
1504 <td>
1505 <input type="checkbox" id="mitigateSSRF">
1506 </td>
1507 </tr>
1508 <tr>
1509 <td>
1510 <label for="blockPeersOnPrivilegedPorts">QBT_TR(Disallow connection to peers on privileged ports:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://libtorrent.org/single-page-ref.html#no_connect_privileged_ports" target="_blank">(?)</a></label>
1511 </td>
1512 <td>
1513 <input type="checkbox" id="blockPeersOnPrivilegedPorts">
1514 </td>
1515 </tr>
1516 <tr>
1517 <td>
1518 <label for="uploadSlotsBehavior">QBT_TR(Upload slots behavior:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#choking_algorithm" target="_blank">(?)</a></label>
1519 </td>
1520 <td>
1521 <select id="uploadSlotsBehavior" style="width: 15em;">
1522 <option value="0">QBT_TR(Fixed slots)QBT_TR[CONTEXT=OptionsDialog]</option>
1523 <option value="1">QBT_TR(Upload rate based)QBT_TR[CONTEXT=OptionsDialog]</option>
1524 </select>
1525 </td>
1526 </tr>
1527 <tr>
1528 <td>
1529 <label for="uploadChokingAlgorithm">QBT_TR(Upload choking algorithm:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#seed_choking_algorithm" target="_blank">(?)</a></label>
1530 </td>
1531 <td>
1532 <select id="uploadChokingAlgorithm" style="width: 15em;">
1533 <option value="0">QBT_TR(Round-robin)QBT_TR[CONTEXT=OptionsDialog]</option>
1534 <option value="1">QBT_TR(Fastest upload)QBT_TR[CONTEXT=OptionsDialog]</option>
1535 <option value="2">QBT_TR(Anti-leech)QBT_TR[CONTEXT=OptionsDialog]</option>
1536 </select>
1537 </td>
1538 </tr>
1539 <tr>
1540 <td>
1541 <label for="announceAllTrackers">QBT_TR(Always announce to all trackers in a tier:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#announce_to_all_trackers" target="_blank">(?)</a></label>
1542 </td>
1543 <td>
1544 <input type="checkbox" id="announceAllTrackers">
1545 </td>
1546 </tr>
1547 <tr>
1548 <td>
1549 <label for="announceAllTiers">QBT_TR(Always announce to all tiers:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#announce_to_all_tiers" target="_blank">(?)</a></label>
1550 </td>
1551 <td>
1552 <input type="checkbox" id="announceAllTiers">
1553 </td>
1554 </tr>
1555 <tr>
1556 <td>
1557 <label for="announceIP">QBT_TR(IP address reported to trackers (requires restart):)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#announce_ip" target="_blank">(?)</a></label>
1558 </td>
1559 <td>
1560 <input type="text" id="announceIP" style="width: 15em;">
1561 </td>
1562 </tr>
1563 <tr>
1564 <td>
1565 <label for="maxConcurrentHTTPAnnounces">QBT_TR(Max concurrent HTTP announces:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#max_concurrent_http_announces" target="_blank">(?)</a></label>
1566 </td>
1567 <td>
1568 <input type="text" id="maxConcurrentHTTPAnnounces" style="width: 15em;">
1569 </td>
1570 </tr>
1571 <tr>
1572 <td>
1573 <label for="stopTrackerTimeout">QBT_TR(Stop tracker timeout [0: disabled]:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#stop_tracker_timeout" target="_blank">(?)</a></label>
1574 </td>
1575 <td>
1576 <input type="text" id="stopTrackerTimeout" style="width: 15em;">
1577 </td>
1578 </tr>
1579 <tr>
1580 <td>
1581 <label for="peerTurnover">QBT_TR(Peer turnover disconnect percentage:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#peer_turnover" target="_blank">(?)</a></label>
1582 </td>
1583 <td>
1584 <input type="text" id="peerTurnover" style="width: 15em;">&nbsp;&nbsp;%
1585 </td>
1586 </tr>
1587 <tr>
1588 <td>
1589 <label for="peerTurnoverCutoff">QBT_TR(Peer turnover threshold percentage:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#peer_turnover" target="_blank">(?)</a></label>
1590 </td>
1591 <td>
1592 <input type="text" id="peerTurnoverCutoff" style="width: 15em;">&nbsp;&nbsp;%
1593 </td>
1594 </tr>
1595 <tr>
1596 <td>
1597 <label for="peerTurnoverInterval">QBT_TR(Peer turnover disconnect interval:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#peer_turnover" target="_blank">(?)</a></label>
1598 </td>
1599 <td>
1600 <input type="text" id="peerTurnoverInterval" style="width: 15em;">&nbsp;&nbsp;s
1601 </td>
1602 </tr>
1603 <tr>
1604 <td>
1605 <label for="requestQueueSize">QBT_TR(Maximum outstanding requests to a single peer:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#max_out_request_queue" target="_blank">(?)</a></label>
1606 </td>
1607 <td>
1608 <input type="text" id="requestQueueSize" style="width: 15em;">
1609 </td>
1610 </tr>
1611 <tr>
1612 <td>
1613 <label for="dhtBootstrapNodes">QBT_TR(DHT bootstrap nodes:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#dht_bootstrap_nodes" target="_blank">(?)</a></label>
1614 </td>
1615 <td>
1616 <input type="text" id="dhtBootstrapNodes" placeholder="QBT_TR(Resets to default if empty)QBT_TR[CONTEXT=OptionsDialog]" style="width: 15em;">
1617 </td>
1618 </tr>
1619 <tr id="rowI2pInboundQuantity">
1620 <td>
1621 <label for="i2pInboundQuantity">QBT_TR(I2P inbound quantity:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#i2p_inbound_quantity" target="_blank">(?)</a></label>
1622 </td>
1623 <td>
1624 <input id="i2pInboundQuantity" type="number" min="1" max="16" onchange="qBittorrent.Preferences.numberInputLimiter(this);" style="width: 15em;">
1625 </td>
1626 </tr>
1627 <tr id="rowI2pOutboundQuantity">
1628 <td>
1629 <label for="i2pOutboundQuantity">QBT_TR(I2P outbound quantity:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#i2p_outbound_quantity" target="_blank">(?)</a></label>
1630 </td>
1631 <td>
1632 <input id="i2pOutboundQuantity" type="number" min="1" max="16" onchange="qBittorrent.Preferences.numberInputLimiter(this);" style="width: 15em;">
1633 </td>
1634 </tr>
1635 <tr id="rowI2pInboundLength">
1636 <td>
1637 <label for="i2pInboundLength">QBT_TR(I2P inbound length:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#i2p_inbound_length" target="_blank">(?)</a></label>
1638 </td>
1639 <td>
1640 <input id="i2pInboundLength" type="number" min="0" max="7" onchange="qBittorrent.Preferences.numberInputLimiter(this);" style="width: 15em;">
1641 </td>
1642 </tr>
1643 <tr id="rowI2pOutboundLength">
1644 <td>
1645 <label for="i2pOutboundLength">QBT_TR(I2P outbound length:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#i2p_outbound_length" target="_blank">(?)</a></label>
1646 </td>
1647 <td>
1648 <input id="i2pOutboundLength" type="number" min="0" max="7" onchange="qBittorrent.Preferences.numberInputLimiter(this);" style="width: 15em;">
1649 </td>
1650 </tr>
1651 </tbody>
1652 </table>
1653 </fieldset>
1654 </div>
1656 <div style="text-align: center; margin-top: 1em;"><input type="button" value="QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" onclick="qBittorrent.Preferences.applyPreferences();"></div>
1658 <script>
1659 "use strict";
1661 window.qBittorrent ??= {};
1662 window.qBittorrent.Preferences ??= (() => {
1663 const exports = () => {
1664 return {
1665 setup: setup,
1666 numberInputLimiter: numberInputLimiter,
1667 updateFileLogEnabled: updateFileLogEnabled,
1668 updateFileLogBackupEnabled: updateFileLogBackupEnabled,
1669 updateFileLogDeleteEnabled: updateFileLogDeleteEnabled,
1670 updateTempDirEnabled: updateTempDirEnabled,
1671 updateExportDirEnabled: updateExportDirEnabled,
1672 updateExportDirFinEnabled: updateExportDirFinEnabled,
1673 addWatchFolder: addWatchFolder,
1674 updateExcludedFileNamesEnabled: updateExcludedFileNamesEnabled,
1675 changeWatchFolderSelect: changeWatchFolderSelect,
1676 updateMailNotification: updateMailNotification,
1677 updateMailAuthSettings: updateMailAuthSettings,
1678 sendTestEmail: sendTestEmail,
1679 updateAutoRun: updateAutoRun,
1680 updateAutoRunOnTorrentAdded: updateAutoRunOnTorrentAdded,
1681 generateRandomPort: generateRandomPort,
1682 updateMaxConnecEnabled: updateMaxConnecEnabled,
1683 updateMaxConnecPerTorrentEnabled: updateMaxConnecPerTorrentEnabled,
1684 updateMaxUploadsEnabled: updateMaxUploadsEnabled,
1685 updateMaxUploadsPerTorrentEnabled: updateMaxUploadsPerTorrentEnabled,
1686 updateI2PSettingsEnabled: updateI2PSettingsEnabled,
1687 updatePeerProxySettings: updatePeerProxySettings,
1688 updatePeerProxyAuthSettings: updatePeerProxyAuthSettings,
1689 updateFilterSettings: updateFilterSettings,
1690 updateSchedulingEnabled: updateSchedulingEnabled,
1691 updateQueueingSystem: updateQueueingSystem,
1692 updateSlowTorrentsSettings: updateSlowTorrentsSettings,
1693 updateMaxRatioTimeEnabled: updateMaxRatioTimeEnabled,
1694 updateAddTrackersEnabled: updateAddTrackersEnabled,
1695 updateHttpsSettings: updateHttpsSettings,
1696 updateBypasssAuthSettings: updateBypasssAuthSettings,
1697 updateAlternativeWebUISettings: updateAlternativeWebUISettings,
1698 updateHostHeaderValidationSettings: updateHostHeaderValidationSettings,
1699 updateWebUICustomHTTPHeadersSettings: updateWebUICustomHTTPHeadersSettings,
1700 updateWebUIReverseProxySettings: updateWebUIReverseProxySettings,
1701 updateDynDnsSettings: updateDynDnsSettings,
1702 updateWebuiLocaleSelect: updateWebuiLocaleSelect,
1703 registerDynDns: registerDynDns,
1704 applyPreferences: applyPreferences
1708 // Behavior tab
1709 const numberInputLimiter = (input) => {
1710 const min = input.getAttribute("min");
1711 const max = input.getAttribute("max");
1713 if (min && (input.value.toInt() < min.toInt()))
1714 input.value = min;
1716 if (max && (input.value.toInt() > max.toInt()))
1717 input.value = max;
1720 const updateFileLogEnabled = function() {
1721 const isFileLogEnabled = $("filelog_checkbox").checked;
1722 $("filelog_save_path_input").disabled = !isFileLogEnabled;
1723 $("filelog_backup_checkbox").disabled = !isFileLogEnabled;
1724 $("filelog_delete_old_checkbox").disabled = !isFileLogEnabled;
1726 updateFileLogBackupEnabled();
1727 updateFileLogDeleteEnabled();
1730 const updateFileLogBackupEnabled = function() {
1731 const pros = $("filelog_backup_checkbox").getProperties("disabled", "checked");
1732 $("filelog_max_size_input").disabled = pros.disabled || !pros.checked;
1735 const updateFileLogDeleteEnabled = function() {
1736 const pros = $("filelog_delete_old_checkbox").getProperties("disabled", "checked");
1737 $("filelog_age_input").disabled = pros.disabled || !pros.checked;
1738 $("filelog_age_type_select").disabled = pros.disabled || !pros.checked;
1741 // Downloads tab
1742 let watchedFoldersTable;
1744 const updateTempDirEnabled = function() {
1745 const isTempDirEnabled = $("temppath_checkbox").checked;
1746 $("temppath_text").disabled = !isTempDirEnabled;
1749 const changeWatchFolderSelect = (item) => {
1750 if (item.value === "other") {
1751 item.nextElementSibling.hidden = false;
1752 item.nextElementSibling.value = "QBT_TR(Type folder here)QBT_TR[CONTEXT=ScanFoldersModel]";
1753 item.nextElementSibling.select();
1755 else {
1756 item.nextElementSibling.hidden = true;
1757 const text = item.options[item.selectedIndex].textContent;
1758 item.nextElementSibling.value = text;
1762 const addWatchFolder = (folder = "", sel = "default_folder", other = "") => {
1763 const pos = $("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length;
1764 const myinput = "<input id='text_watch_" + pos + "' type='text' value='" + folder + "'>";
1765 const disableInput = (sel !== "other");
1766 const mycb = "<div class='select-watched-folder-editable'>"
1767 + "<select id ='cb_watch_" + pos + "' onchange='qBittorrent.Preferences.changeWatchFolderSelect(this)'>"
1768 + "<option value='watch_folder'>QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
1769 + "<option value='default_folder'>QBT_TR(Default save location)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
1770 + "<option value='other'>QBT_TR(Other...)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
1771 + "</select>"
1772 + "<input id='cb_watch_txt_" + pos + "' type='text' " + (disableInput ? "hidden " : "") + "/>"
1773 + "<img src='images/list-add.svg' id='addFolderImg_" + pos + "' alt='Add' style='padding-left:170px;width:16px;cursor:pointer;' onclick='qBittorrent.Preferences.addWatchFolder();'>"
1774 + "</div>";
1776 watchedFoldersTable.push([myinput, mycb]);
1777 $("cb_watch_" + pos).value = sel;
1778 if (disableInput) {
1779 const elt = $("cb_watch_" + pos);
1780 other = elt.options[elt.selectedIndex].textContent;
1782 $("cb_watch_txt_" + pos).value = other;
1784 // hide previous img
1785 if (pos > 0)
1786 $("addFolderImg_" + (pos - 1)).style.display = "none";
1789 const getWatchedFolders = () => {
1790 const nb_folders = $("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length;
1791 const folders = new Hash();
1792 for (let i = 0; i < nb_folders; ++i) {
1793 const fpath = $("text_watch_" + i).value.trim();
1794 if (fpath.length > 0) {
1795 const sel = $("cb_watch_" + i).value.trim();
1797 let other;
1798 if (sel === "other")
1799 other = $("cb_watch_txt_" + i).value.trim();
1800 else
1801 other = (sel === "watch_folder") ? 0 : 1;
1803 folders.set(fpath, other);
1806 return folders;
1809 const updateExcludedFileNamesEnabled = function() {
1810 const isAExcludedFileNamesEnabled = $("excludedFileNamesCheckbox").checked;
1811 $("excludedFileNamesTextarea").disabled = !isAExcludedFileNamesEnabled;
1814 const updateExportDirEnabled = function() {
1815 const isExportDirEnabled = $("exportdir_checkbox").checked;
1816 $("exportdir_text").disabled = !isExportDirEnabled;
1819 const updateExportDirFinEnabled = function() {
1820 const isExportDirFinEnabled = $("exportdirfin_checkbox").checked;
1821 $("exportdirfin_text").disabled = !isExportDirFinEnabled;
1824 const updateMailNotification = function() {
1825 const isMailNotificationEnabled = $("mail_notification_checkbox").checked;
1826 $("src_email_txt").disabled = !isMailNotificationEnabled;
1827 $("dest_email_txt").disabled = !isMailNotificationEnabled;
1828 $("smtp_server_txt").disabled = !isMailNotificationEnabled;
1829 $("mail_ssl_checkbox").disabled = !isMailNotificationEnabled;
1830 $("mail_auth_checkbox").disabled = !isMailNotificationEnabled;
1831 $("mail_test_button").disabled = !isMailNotificationEnabled;
1833 if (!isMailNotificationEnabled) {
1834 $("mail_auth_checkbox").checked = !isMailNotificationEnabled;
1835 updateMailAuthSettings();
1839 const updateMailAuthSettings = function() {
1840 const isMailAuthEnabled = $("mail_auth_checkbox").checked;
1841 $("mail_username_text").disabled = !isMailAuthEnabled;
1842 $("mail_password_text").disabled = !isMailAuthEnabled;
1845 const sendTestEmail = function() {
1846 new Request({
1847 url: "api/v2/app/sendTestEmail",
1848 method: "post",
1849 onFailure: function() {
1850 alert("QBT_TR(Could not contact qBittorrent)QBT_TR[CONTEXT=HttpServer]");
1852 onSuccess: function() {
1853 alert("QBT_TR(Attempted to send email. Check your inbox to confirm success)QBT_TR[CONTEXT=OptionsDialog]");
1855 }).send();
1858 const updateAutoRunOnTorrentAdded = function() {
1859 const isAutoRunOnTorrentAddedEnabled = $("autorunOnTorrentAddedCheckbox").checked;
1860 $("autorunOnTorrentAddedProgram").disabled = !isAutoRunOnTorrentAddedEnabled;
1863 const updateAutoRun = function() {
1864 const isAutoRunEnabled = $("autorun_checkbox").checked;
1865 $("autorunProg_txt").disabled = !isAutoRunEnabled;
1868 // Connection tab
1870 const updateMaxConnecEnabled = function() {
1871 const isMaxConnecEnabled = $("max_connec_checkbox").checked;
1872 $("max_connec_value").disabled = !isMaxConnecEnabled;
1875 const updateMaxConnecPerTorrentEnabled = function() {
1876 const isMaxConnecPerTorrentEnabled = $("max_connec_per_torrent_checkbox").checked;
1877 $("max_connec_per_torrent_value").disabled = !isMaxConnecPerTorrentEnabled;
1880 const updateMaxUploadsEnabled = function() {
1881 const isMaxUploadsEnabled = $("max_uploads_checkbox").checked;
1882 $("max_uploads_value").disabled = !isMaxUploadsEnabled;
1885 const updateMaxUploadsPerTorrentEnabled = function() {
1886 const isMaxUploadsPerTorrentEnabled = $("max_uploads_per_torrent_checkbox").checked;
1887 $("max_uploads_per_torrent_value").disabled = !isMaxUploadsPerTorrentEnabled;
1890 const updateI2PSettingsEnabled = function() {
1891 const isI2PEnabled = $("i2pEnabledCheckbox").checked;
1892 $("i2pAddress").disabled = !isI2PEnabled;
1893 $("i2pPort").disabled = !isI2PEnabled;
1894 $("i2pMixedMode").disabled = !isI2PEnabled;
1897 const updatePeerProxySettings = function() {
1898 const proxyType = $("peer_proxy_type_select").value;
1899 const isProxyDisabled = (proxyType === "None");
1900 const isProxySocks4 = (proxyType === "SOCKS4");
1902 $("peer_proxy_host_text").disabled = isProxyDisabled;
1903 $("peer_proxy_port_value").disabled = isProxyDisabled;
1905 $("peer_proxy_auth_checkbox").disabled = (isProxyDisabled || isProxySocks4);
1906 $("proxy_bittorrent_checkbox").disabled = isProxyDisabled;
1907 $("use_peer_proxy_checkbox").disabled = (isProxyDisabled || !$("proxy_bittorrent_checkbox").checked);
1908 $("proxyHostnameLookupCheckbox").disabled = (isProxyDisabled || isProxySocks4);
1909 $("proxy_rss_checkbox").disabled = (isProxyDisabled || isProxySocks4);
1910 $("proxy_misc_checkbox").disabled = (isProxyDisabled || isProxySocks4);
1912 updatePeerProxyAuthSettings();
1915 const updatePeerProxyAuthSettings = function() {
1916 const proxyType = $("peer_proxy_type_select").value;
1917 const isProxyDisabled = (proxyType === "None");
1918 const isPeerProxyAuthEnabled = (!$("peer_proxy_auth_checkbox").disabled && $("peer_proxy_auth_checkbox").checked);
1919 $("peer_proxy_username_text").disabled = (isProxyDisabled || !isPeerProxyAuthEnabled);
1920 $("peer_proxy_password_text").disabled = (isProxyDisabled || !isPeerProxyAuthEnabled);
1923 const updateFilterSettings = function() {
1924 const isIPFilterEnabled = $("ipfilter_text_checkbox").checked;
1925 $("ipfilter_text").disabled = !isIPFilterEnabled;
1928 // Speed tab
1929 const updateSchedulingEnabled = function() {
1930 const isLimitSchedulingEnabled = $("limitSchedulingCheckbox").checked;
1931 $("schedule_from_hour").disabled = !isLimitSchedulingEnabled;
1932 $("schedule_from_min").disabled = !isLimitSchedulingEnabled;
1933 $("schedule_to_hour").disabled = !isLimitSchedulingEnabled;
1934 $("schedule_to_min").disabled = !isLimitSchedulingEnabled;
1935 $("schedule_freq_select").disabled = !isLimitSchedulingEnabled;
1938 // Bittorrent tab
1939 const updateQueueingSystem = function() {
1940 const isQueueingEnabled = $("queueing_checkbox").checked;
1941 $("max_active_dl_value").disabled = !isQueueingEnabled;
1942 $("max_active_up_value").disabled = !isQueueingEnabled;
1943 $("max_active_to_value").disabled = !isQueueingEnabled;
1944 $("dont_count_slow_torrents_checkbox").disabled = !isQueueingEnabled;
1945 updateSlowTorrentsSettings();
1948 const updateSlowTorrentsSettings = function() {
1949 const isDontCountSlowTorrentsEnabled = (!$("dont_count_slow_torrents_checkbox").disabled) && $("dont_count_slow_torrents_checkbox").checked;
1950 $("dl_rate_threshold").disabled = !isDontCountSlowTorrentsEnabled;
1951 $("ul_rate_threshold").disabled = !isDontCountSlowTorrentsEnabled;
1952 $("torrent_inactive_timer").disabled = !isDontCountSlowTorrentsEnabled;
1955 const updateMaxRatioTimeEnabled = function() {
1956 const isMaxRatioEnabled = $("max_ratio_checkbox").checked;
1957 $("max_ratio_value").disabled = !isMaxRatioEnabled;
1959 const isMaxSeedingTimeEnabled = $("max_seeding_time_checkbox").checked;
1960 $("max_seeding_time_value").disabled = !isMaxSeedingTimeEnabled;
1962 const isMaxInactiveSeedingTimeEnabled = $("max_inactive_seeding_time_checkbox").checked;
1963 $("max_inactive_seeding_time_value").disabled = !isMaxInactiveSeedingTimeEnabled;
1965 $("max_ratio_act").disabled = !(isMaxRatioEnabled || isMaxSeedingTimeEnabled || isMaxInactiveSeedingTimeEnabled);
1968 const updateAddTrackersEnabled = function() {
1969 const isAddTrackersEnabled = $("add_trackers_checkbox").checked;
1970 $("add_trackers_textarea").disabled = !isAddTrackersEnabled;
1973 // WebUI tab
1974 const updateHttpsSettings = function() {
1975 const isUseHttpsEnabled = $("use_https_checkbox").checked;
1976 $("ssl_cert_text").disabled = !isUseHttpsEnabled;
1977 $("ssl_key_text").disabled = !isUseHttpsEnabled;
1980 const updateBypasssAuthSettings = function() {
1981 const isBypassAuthSubnetWhitelistEnabled = $("bypass_auth_subnet_whitelist_checkbox").checked;
1982 $("bypass_auth_subnet_whitelist_textarea").disabled = !isBypassAuthSubnetWhitelistEnabled;
1985 const updateAlternativeWebUISettings = function() {
1986 const isUseAlternativeWebUIEnabled = $("use_alt_webui_checkbox").checked;
1987 $("webui_files_location_textarea").disabled = !isUseAlternativeWebUIEnabled;
1990 const updateHostHeaderValidationSettings = function() {
1991 const isHostHeaderValidationEnabled = $("host_header_validation_checkbox").checked;
1992 $("webui_domain_textarea").disabled = !isHostHeaderValidationEnabled;
1995 const updateWebUICustomHTTPHeadersSettings = function() {
1996 const isEnabled = $("webUIUseCustomHTTPHeadersCheckbox").checked;
1997 $("webUICustomHTTPHeadersTextarea").disabled = !isEnabled;
2000 const updateWebUIReverseProxySettings = function() {
2001 const isEnabled = $("webUIReverseProxySupportCheckbox").checked;
2002 $("webUIReverseProxiesListTextarea").disabled = !isEnabled;
2005 const updateDynDnsSettings = function() {
2006 const isDynDnsEnabled = $("use_dyndns_checkbox").checked;
2007 $("dyndns_select").disabled = !isDynDnsEnabled;
2008 $("dyndns_domain_text").disabled = !isDynDnsEnabled;
2009 $("dyndns_username_text").disabled = !isDynDnsEnabled;
2010 $("dyndns_password_text").disabled = !isDynDnsEnabled;
2013 const registerDynDns = function() {
2014 if ($("dyndns_select").value.toInt() === 1)
2015 window.open("http://www.no-ip.com/services/managed_dns/free_dynamic_dns.html", "NO-IP Registration");
2016 else
2017 window.open("https://www.dyndns.com/account/services/hosts/add.html", "DynDNS Registration");
2020 const generateRandomPort = function() {
2021 const min = 1024;
2022 const max = 65535;
2023 const port = Math.floor(Math.random() * (max - min + 1) + min);
2024 $("port_value").value = port;
2027 const time_padding = function(val) {
2028 let ret = val.toString();
2029 if (ret.length === 1)
2030 ret = "0" + ret;
2031 return ret;
2034 // Advanced Tab
2035 const updateNetworkInterfaces = function(default_iface, default_iface_name) {
2036 const url = "api/v2/app/networkInterfaceList";
2037 $("networkInterface").getChildren().each(c => c.destroy());
2038 new Request.JSON({
2039 url: url,
2040 method: "get",
2041 noCache: true,
2042 onFailure: function() {
2043 alert("Could not contact qBittorrent");
2045 onSuccess: function(ifaces) {
2046 if (!Array.isArray(ifaces))
2047 return;
2049 // add the current network interface to the options if needed
2050 if (default_iface && !ifaces.some((item) => item.value === default_iface))
2051 ifaces.push({ name: default_iface_name || default_iface, value: default_iface });
2053 $("networkInterface").options.add(new Option("QBT_TR(Any interface)QBT_TR[CONTEXT=OptionsDialog]", ""));
2054 ifaces.forEach((item, index) => {
2055 $("networkInterface").options.add(new Option(item.name, item.value));
2057 $("networkInterface").value = default_iface;
2059 }).send();
2062 const updateInterfaceAddresses = function(iface, default_addr) {
2063 const url = "api/v2/app/networkInterfaceAddressList";
2064 $("optionalIPAddressToBind").getChildren().each(c => c.destroy());
2065 new Request.JSON({
2066 url: url,
2067 method: "get",
2068 noCache: true,
2069 data: {
2070 "iface": iface
2072 onFailure: function() {
2073 alert("Could not contact qBittorrent");
2075 onSuccess: function(addresses) {
2076 if (!addresses)
2077 return;
2079 $("optionalIPAddressToBind").options.add(new Option("QBT_TR(All addresses)QBT_TR[CONTEXT=OptionDialog]", ""));
2080 $("optionalIPAddressToBind").options.add(new Option("QBT_TR(All IPv4 addresses)QBT_TR[CONTEXT=OptionDialog]", "0.0.0.0"));
2081 $("optionalIPAddressToBind").options.add(new Option("QBT_TR(All IPv6 addresses)QBT_TR[CONTEXT=OptionDialog]", "::"));
2082 addresses.forEach((item, index) => {
2083 $("optionalIPAddressToBind").options.add(new Option(item, item));
2085 $("optionalIPAddressToBind").value = default_addr;
2087 }).send();
2090 const updateWebuiLocaleSelect = (selected) => {
2091 const languages = [];
2092 for (let i = 0; i < $("locale_select").options.length; i++)
2093 languages.push($("locale_select").options[i].value);
2095 if (!languages.includes(selected)) {
2096 const lang = selected.slice(0, selected.indexOf("_"));
2097 selected = languages.includes(lang) ? lang : "en";
2099 $("locale_select").value = selected;
2102 const loadPreferences = function() {
2103 window.parent.qBittorrent.Cache.preferences.init({
2104 onSuccess: (pref) => {
2105 // Behavior tab
2106 document.getElementById("displayFullURLTrackerColumn").checked = (LocalPreferences.get("full_url_tracker_column", "false") === "true");
2107 document.getElementById("hideZeroFiltersCheckbox").checked = (LocalPreferences.get("hide_zero_status_filters", "false") === "true");
2108 $("dblclickDownloadSelect").value = LocalPreferences.get("dblclick_download", "1");
2109 $("dblclickCompleteSelect").value = LocalPreferences.get("dblclick_complete", "1");
2110 document.getElementById("useAltRowColorsInput").checked = (LocalPreferences.get("use_alt_row_colors", "true") === "true");
2111 $("filelog_checkbox").checked = pref.file_log_enabled;
2112 $("filelog_save_path_input").value = pref.file_log_path;
2113 $("filelog_backup_checkbox").checked = pref.file_log_backup_enabled;
2114 $("filelog_max_size_input").value = pref.file_log_max_size;
2115 $("filelog_delete_old_checkbox").checked = pref.file_log_delete_old;
2116 $("filelog_age_input").value = pref.file_log_age;
2117 $("filelog_age_type_select").value = pref.file_log_age_type;
2118 updateFileLogEnabled();
2120 // Downloads tab
2121 // When adding a torrent
2122 let index = 0;
2123 switch (pref.torrent_content_layout) {
2124 case "Original":
2125 index = 0;
2126 break;
2127 case "Subfolder":
2128 index = 1;
2129 break;
2130 case "NoSubfolder":
2131 index = 2;
2132 break;
2134 $("contentlayout_select").getChildren("option")[index].selected = true;
2135 $("addToTopOfQueueCheckbox").checked = pref.add_to_top_of_queue;
2136 $("dontstartdownloads_checkbox").checked = pref.add_stopped_enabled;
2137 switch (pref.torrent_stop_condition) {
2138 case "None":
2139 index = 0;
2140 break;
2141 case "MetadataReceived":
2142 index = 1;
2143 break;
2144 case "FilesChecked":
2145 index = 2;
2146 break;
2148 $("stopConditionSelect").getChildren("option")[index].selected = true;
2149 document.getElementById("mergeTrackersInput").checked = pref.merge_trackers;
2150 $("deletetorrentfileafter_checkbox").checked = pref.auto_delete_mode;
2152 $("preallocateall_checkbox").checked = pref.preallocate_all;
2153 $("appendext_checkbox").checked = pref.incomplete_files_ext;
2154 $("unwantedfolder_checkbox").checked = pref.use_unwanted_folder;
2156 // Saving Management
2157 $("default_tmm_combobox").value = pref.auto_tmm_enabled;
2158 $("torrent_changed_tmm_combobox").value = pref.torrent_changed_tmm_enabled;
2159 $("save_path_changed_tmm_combobox").value = pref.save_path_changed_tmm_enabled;
2160 $("category_changed_tmm_combobox").value = pref.category_changed_tmm_enabled;
2161 $("use_subcategories_checkbox").checked = pref.use_subcategories;
2162 document.getElementById("categoryPathsManualModeCheckbox").checked = pref.use_category_paths_in_manual_mode;
2163 $("savepath_text").value = pref.save_path;
2164 $("temppath_checkbox").checked = pref.temp_path_enabled;
2165 $("temppath_text").value = pref.temp_path;
2166 updateTempDirEnabled();
2167 if (pref.export_dir !== "") {
2168 $("exportdir_checkbox").checked = true;
2169 $("exportdir_text").value = pref.export_dir;
2171 else {
2172 $("exportdir_checkbox").checked = false;
2173 $("exportdir_text").value = "";
2175 updateExportDirEnabled();
2176 if (pref.export_dir_fin !== "") {
2177 $("exportdirfin_checkbox").checked = true;
2178 $("exportdirfin_text").value = pref.export_dir_fin;
2180 else {
2181 $("exportdirfin_checkbox").checked = false;
2182 $("exportdirfin_text").value = "";
2184 updateExportDirFinEnabled();
2186 // Automatically add torrents from
2187 for (const folder in pref.scan_dirs) {
2188 if (!Object.hasOwn(pref.scan_dirs, folder))
2189 continue;
2191 const folderType = pref.scan_dirs[folder];
2192 let sel = "";
2193 let other = "";
2194 if (typeof folderType === "number") {
2195 sel = (folderType === 0) ? "watch_folder" : "default_folder";
2197 else {
2198 sel = "other";
2199 other = folderType;
2201 addWatchFolder(folder, sel, other);
2203 addWatchFolder();
2205 // Excluded file names
2206 $("excludedFileNamesCheckbox").checked = pref.excluded_file_names_enabled;
2207 $("excludedFileNamesTextarea").value = pref.excluded_file_names;
2209 // Email notification upon download completion
2210 $("mail_notification_checkbox").checked = pref.mail_notification_enabled;
2211 $("src_email_txt").value = pref.mail_notification_sender;
2212 $("dest_email_txt").value = pref.mail_notification_email;
2213 $("smtp_server_txt").value = pref.mail_notification_smtp;
2214 $("mail_ssl_checkbox").checked = pref.mail_notification_ssl_enabled;
2215 $("mail_auth_checkbox").checked = pref.mail_notification_auth_enabled;
2216 $("mail_username_text").value = pref.mail_notification_username;
2217 $("mail_password_text").value = pref.mail_notification_password;
2218 updateMailNotification();
2219 updateMailAuthSettings();
2221 // Run an external program on torrent added
2222 $("autorunOnTorrentAddedCheckbox").checked = pref.autorun_on_torrent_added_enabled;
2223 $("autorunOnTorrentAddedProgram").value = pref.autorun_on_torrent_added_program;
2224 updateAutoRunOnTorrentAdded();
2225 // Run an external program on torrent finished
2226 $("autorun_checkbox").checked = pref.autorun_enabled;
2227 $("autorunProg_txt").value = pref.autorun_program;
2228 updateAutoRun();
2230 // Connection tab
2231 // Listening Port
2232 $("port_value").value = pref.listen_port.toInt();
2233 $("upnp_checkbox").checked = pref.upnp;
2235 // Connections Limits
2236 const max_connec = pref.max_connec.toInt();
2237 if (max_connec <= 0) {
2238 $("max_connec_checkbox").checked = false;
2239 $("max_connec_value").value = 500;
2241 else {
2242 $("max_connec_checkbox").checked = true;
2243 $("max_connec_value").value = max_connec;
2245 updateMaxConnecEnabled();
2246 const max_connec_per_torrent = pref.max_connec_per_torrent.toInt();
2247 if (max_connec_per_torrent <= 0) {
2248 $("max_connec_per_torrent_checkbox").checked = false;
2249 $("max_connec_per_torrent_value").value = 100;
2251 else {
2252 $("max_connec_per_torrent_checkbox").checked = true;
2253 $("max_connec_per_torrent_value").value = max_connec_per_torrent;
2255 updateMaxConnecPerTorrentEnabled();
2256 const max_uploads = pref.max_uploads.toInt();
2257 if (max_uploads <= 0) {
2258 $("max_uploads_checkbox").checked = false;
2259 $("max_uploads_value").value = 8;
2261 else {
2262 $("max_uploads_checkbox").checked = true;
2263 $("max_uploads_value").value = max_uploads;
2265 updateMaxUploadsEnabled();
2266 const max_uploads_per_torrent = pref.max_uploads_per_torrent.toInt();
2267 if (max_uploads_per_torrent <= 0) {
2268 $("max_uploads_per_torrent_checkbox").checked = false;
2269 $("max_uploads_per_torrent_value").value = 4;
2271 else {
2272 $("max_uploads_per_torrent_checkbox").checked = true;
2273 $("max_uploads_per_torrent_value").value = max_uploads_per_torrent;
2275 updateMaxUploadsPerTorrentEnabled();
2277 // I2P
2278 $("i2pEnabledCheckbox").checked = pref.i2p_enabled;
2279 $("i2pAddress").value = pref.i2p_address;
2280 $("i2pPort").value = pref.i2p_port;
2281 $("i2pMixedMode").checked = pref.i2p_mixed_mode;
2282 updateI2PSettingsEnabled();
2284 // Proxy Server
2285 $("peer_proxy_type_select").value = pref.proxy_type;
2286 $("peer_proxy_host_text").value = pref.proxy_ip;
2287 $("peer_proxy_port_value").value = pref.proxy_port;
2288 $("peer_proxy_auth_checkbox").checked = pref.proxy_auth_enabled;
2289 $("peer_proxy_username_text").value = pref.proxy_username;
2290 $("peer_proxy_password_text").value = pref.proxy_password;
2291 $("proxyHostnameLookupCheckbox").checked = pref.proxy_hostname_lookup;
2292 $("proxy_bittorrent_checkbox").checked = pref.proxy_bittorrent;
2293 $("use_peer_proxy_checkbox").checked = pref.proxy_peer_connections;
2294 $("proxy_rss_checkbox").checked = pref.proxy_rss;
2295 $("proxy_misc_checkbox").checked = pref.proxy_misc;
2296 updatePeerProxySettings();
2298 // IP Filtering
2299 $("ipfilter_text_checkbox").checked = pref.ip_filter_enabled;
2300 $("ipfilter_text").value = pref.ip_filter_path;
2301 $("ipfilter_trackers_checkbox").checked = pref.ip_filter_trackers;
2302 $("banned_IPs_textarea").value = pref.banned_IPs;
2303 updateFilterSettings();
2305 // Speed tab
2306 // Global Rate Limits
2307 $("up_limit_value").value = (pref.up_limit.toInt() / 1024);
2308 $("dl_limit_value").value = (pref.dl_limit.toInt() / 1024);
2309 // Alternative Global Rate Limits
2310 $("alt_up_limit_value").value = (pref.alt_up_limit.toInt() / 1024);
2311 $("alt_dl_limit_value").value = (pref.alt_dl_limit.toInt() / 1024);
2313 $("enable_protocol_combobox").value = pref.bittorrent_protocol;
2314 $("limit_utp_rate_checkbox").checked = pref.limit_utp_rate;
2315 $("limit_tcp_overhead_checkbox").checked = pref.limit_tcp_overhead;
2316 $("limit_lan_peers_checkbox").checked = pref.limit_lan_peers;
2318 // Scheduling
2319 $("limitSchedulingCheckbox").checked = pref.scheduler_enabled;
2320 $("schedule_from_hour").value = time_padding(pref.schedule_from_hour);
2321 $("schedule_from_min").value = time_padding(pref.schedule_from_min);
2322 $("schedule_to_hour").value = time_padding(pref.schedule_to_hour);
2323 $("schedule_to_min").value = time_padding(pref.schedule_to_min);
2324 $("schedule_freq_select").value = pref.scheduler_days;
2325 updateSchedulingEnabled();
2327 // Bittorrent tab
2328 // Privacy
2329 $("dht_checkbox").checked = pref.dht;
2330 $("pex_checkbox").checked = pref.pex;
2331 $("lsd_checkbox").checked = pref.lsd;
2332 const encryption = pref.encryption.toInt();
2333 $("encryption_select").getChildren("option")[encryption].selected = true;
2334 $("anonymous_mode_checkbox").checked = pref.anonymous_mode;
2336 $("maxActiveCheckingTorrents").value = pref.max_active_checking_torrents;
2338 // Torrent Queueing
2339 $("queueing_checkbox").checked = pref.queueing_enabled;
2340 $("max_active_dl_value").value = pref.max_active_downloads.toInt();
2341 $("max_active_up_value").value = pref.max_active_uploads.toInt();
2342 $("max_active_to_value").value = pref.max_active_torrents.toInt();
2343 $("dont_count_slow_torrents_checkbox").checked = pref.dont_count_slow_torrents;
2344 $("dl_rate_threshold").value = pref.slow_torrent_dl_rate_threshold.toInt();
2345 $("ul_rate_threshold").value = pref.slow_torrent_ul_rate_threshold.toInt();
2346 $("torrent_inactive_timer").value = pref.slow_torrent_inactive_timer.toInt();
2347 updateQueueingSystem();
2349 // Share Limiting
2350 $("max_ratio_checkbox").checked = pref.max_ratio_enabled;
2351 $("max_ratio_value").value = (pref.max_ratio_enabled ? pref.max_ratio : 1);
2352 $("max_seeding_time_checkbox").checked = pref.max_seeding_time_enabled;
2353 $("max_seeding_time_value").value = (pref.max_seeding_time_enabled ? pref.max_seeding_time.toInt() : 1440);
2354 $("max_inactive_seeding_time_checkbox").checked = pref.max_inactive_seeding_time_enabled;
2355 $("max_inactive_seeding_time_value").value = (pref.max_inactive_seeding_time_enabled ? pref.max_inactive_seeding_time.toInt() : 1440);
2356 let maxRatioAct = 0;
2357 switch (pref.max_ratio_act.toInt()) {
2358 case 0: // Stop
2359 default:
2360 maxRatioAct = 0;
2361 break;
2362 case 1: // Remove
2363 maxRatioAct = 1;
2364 break;
2365 case 2: // Enable super seeding
2366 maxRatioAct = 3;
2367 break;
2368 case 3: // Remove torrent and files
2369 maxRatioAct = 2;
2370 break;
2372 $("max_ratio_act").getChildren("option")[maxRatioAct].selected = true;
2373 updateMaxRatioTimeEnabled();
2375 // Add trackers
2376 $("add_trackers_checkbox").checked = pref.add_trackers_enabled;
2377 $("add_trackers_textarea").value = pref.add_trackers;
2378 updateAddTrackersEnabled();
2380 // RSS Tab
2381 $("enable_fetching_rss_feeds_checkbox").checked = pref.rss_processing_enabled;
2382 $("feed_refresh_interval").value = pref.rss_refresh_interval;
2383 $("feedFetchDelay").value = pref.rss_fetch_delay;
2384 $("maximum_article_number").value = pref.rss_max_articles_per_feed;
2385 $("enable_auto_downloading_rss_torrents_checkbox").checked = pref.rss_auto_downloading_enabled;
2386 $("downlock_repack_proper_episodes").checked = pref.rss_download_repack_proper_episodes;
2387 $("rss_filter_textarea").value = pref.rss_smart_episode_filters;
2389 // WebUI tab
2390 // Language
2391 updateWebuiLocaleSelect(pref.locale);
2392 $("performanceWarning").checked = pref.performance_warning;
2394 // HTTP Server
2395 $("webui_domain_textarea").value = pref.web_ui_domain_list;
2396 $("webui_address_value").value = pref.web_ui_address;
2397 $("webui_port_value").value = pref.web_ui_port;
2398 $("webui_upnp_checkbox").checked = pref.web_ui_upnp;
2399 $("use_https_checkbox").checked = pref.use_https;
2400 $("ssl_cert_text").value = pref.web_ui_https_cert_path;
2401 $("ssl_key_text").value = pref.web_ui_https_key_path;
2402 updateHttpsSettings();
2404 // Authentication
2405 $("webui_username_text").value = pref.web_ui_username;
2406 $("bypass_local_auth_checkbox").checked = pref.bypass_local_auth;
2407 $("bypass_auth_subnet_whitelist_checkbox").checked = pref.bypass_auth_subnet_whitelist_enabled;
2408 $("bypass_auth_subnet_whitelist_textarea").value = pref.bypass_auth_subnet_whitelist;
2409 updateBypasssAuthSettings();
2410 $("webUIMaxAuthFailCountInput").value = pref.web_ui_max_auth_fail_count.toInt();
2411 $("webUIBanDurationInput").value = pref.web_ui_ban_duration.toInt();
2412 $("webUISessionTimeoutInput").value = pref.web_ui_session_timeout.toInt();
2414 // Use alternative WebUI
2415 $("use_alt_webui_checkbox").checked = pref.alternative_webui_enabled;
2416 $("webui_files_location_textarea").value = pref.alternative_webui_path;
2417 updateAlternativeWebUISettings();
2419 // Security
2420 $("clickjacking_protection_checkbox").checked = pref.web_ui_clickjacking_protection_enabled;
2421 $("csrf_protection_checkbox").checked = pref.web_ui_csrf_protection_enabled;
2422 $("secureCookieCheckbox").checked = pref.web_ui_secure_cookie_enabled;
2423 $("host_header_validation_checkbox").checked = pref.web_ui_host_header_validation_enabled;
2424 updateHostHeaderValidationSettings();
2426 // Custom HTTP headers
2427 $("webUIUseCustomHTTPHeadersCheckbox").checked = pref.web_ui_use_custom_http_headers_enabled;
2428 $("webUICustomHTTPHeadersTextarea").value = pref.web_ui_custom_http_headers;
2429 updateWebUICustomHTTPHeadersSettings();
2431 // Reverse Proxy
2432 $("webUIReverseProxySupportCheckbox").checked = pref.web_ui_reverse_proxy_enabled;
2433 $("webUIReverseProxiesListTextarea").value = pref.web_ui_reverse_proxies_list;
2434 updateWebUIReverseProxySettings();
2436 // Update my dynamic domain name
2437 $("use_dyndns_checkbox").checked = pref.dyndns_enabled;
2438 $("dyndns_select").value = pref.dyndns_service;
2439 $("dyndns_domain_text").value = pref.dyndns_domain;
2440 $("dyndns_username_text").value = pref.dyndns_username;
2441 $("dyndns_password_text").value = pref.dyndns_password;
2442 updateDynDnsSettings();
2444 // Advanced settings
2445 // qBittorrent section
2446 $("resumeDataStorageType").value = pref.resume_data_storage_type;
2447 $("torrentContentRemoveOption").value = pref.torrent_content_remove_option;
2448 $("memoryWorkingSetLimit").value = pref.memory_working_set_limit;
2449 updateNetworkInterfaces(pref.current_network_interface, pref.current_interface_name);
2450 updateInterfaceAddresses(pref.current_network_interface, pref.current_interface_address);
2451 $("saveResumeDataInterval").value = pref.save_resume_data_interval;
2452 $("torrentFileSizeLimit").value = (pref.torrent_file_size_limit / 1024 / 1024);
2453 $("recheckTorrentsOnCompletion").checked = pref.recheck_completed_torrents;
2454 $("appInstanceName").value = pref.app_instance_name;
2455 $("refreshInterval").value = pref.refresh_interval;
2456 $("resolvePeerCountries").checked = pref.resolve_peer_countries;
2457 $("reannounceWhenAddressChanged").checked = pref.reannounce_when_address_changed;
2458 // libtorrent section
2459 $("bdecodeDepthLimit").value = pref.bdecode_depth_limit;
2460 $("bdecodeTokenLimit").value = pref.bdecode_token_limit;
2461 $("asyncIOThreads").value = pref.async_io_threads;
2462 $("hashingThreads").value = pref.hashing_threads;
2463 $("filePoolSize").value = pref.file_pool_size;
2464 $("outstandMemoryWhenCheckingTorrents").value = pref.checking_memory_use;
2465 $("diskCache").value = pref.disk_cache;
2466 $("diskCacheExpiryInterval").value = pref.disk_cache_ttl;
2467 $("diskQueueSize").value = (pref.disk_queue_size / 1024);
2468 $("diskIOType").value = pref.disk_io_type;
2469 $("diskIOReadMode").value = pref.disk_io_read_mode;
2470 $("diskIOWriteMode").value = pref.disk_io_write_mode;
2471 $("coalesceReadsAndWrites").checked = pref.enable_coalesce_read_write;
2472 $("pieceExtentAffinity").checked = pref.enable_piece_extent_affinity;
2473 $("sendUploadPieceSuggestions").checked = pref.enable_upload_suggestions;
2474 $("sendBufferWatermark").value = pref.send_buffer_watermark;
2475 $("sendBufferLowWatermark").value = pref.send_buffer_low_watermark;
2476 $("sendBufferWatermarkFactor").value = pref.send_buffer_watermark_factor;
2477 $("connectionSpeed").value = pref.connection_speed;
2478 $("socketSendBufferSize").value = (pref.socket_send_buffer_size / 1024);
2479 $("socketReceiveBufferSize").value = (pref.socket_receive_buffer_size / 1024);
2480 $("socketBacklogSize").value = pref.socket_backlog_size;
2481 $("outgoingPortsMin").value = pref.outgoing_ports_min;
2482 $("outgoingPortsMax").value = pref.outgoing_ports_max;
2483 $("UPnPLeaseDuration").value = pref.upnp_lease_duration;
2484 $("peerToS").value = pref.peer_tos;
2485 $("utpTCPMixedModeAlgorithm").value = pref.utp_tcp_mixed_mode;
2486 $("IDNSupportCheckbox").checked = pref.idn_support_enabled;
2487 $("allowMultipleConnectionsFromTheSameIPAddress").checked = pref.enable_multi_connections_from_same_ip;
2488 $("validateHTTPSTrackerCertificate").checked = pref.validate_https_tracker_certificate;
2489 $("mitigateSSRF").checked = pref.ssrf_mitigation;
2490 $("blockPeersOnPrivilegedPorts").checked = pref.block_peers_on_privileged_ports;
2491 $("enableEmbeddedTracker").checked = pref.enable_embedded_tracker;
2492 $("embeddedTrackerPort").value = pref.embedded_tracker_port;
2493 $("embeddedTrackerPortForwarding").checked = pref.embedded_tracker_port_forwarding;
2494 $("markOfTheWeb").checked = pref.mark_of_the_web;
2495 $("pythonExecutablePath").value = pref.python_executable_path;
2496 $("uploadSlotsBehavior").value = pref.upload_slots_behavior;
2497 $("uploadChokingAlgorithm").value = pref.upload_choking_algorithm;
2498 $("announceAllTrackers").checked = pref.announce_to_all_trackers;
2499 $("announceAllTiers").checked = pref.announce_to_all_tiers;
2500 $("announceIP").value = pref.announce_ip;
2501 $("maxConcurrentHTTPAnnounces").value = pref.max_concurrent_http_announces;
2502 $("stopTrackerTimeout").value = pref.stop_tracker_timeout;
2503 $("peerTurnover").value = pref.peer_turnover;
2504 $("peerTurnoverCutoff").value = pref.peer_turnover_cutoff;
2505 $("peerTurnoverInterval").value = pref.peer_turnover_interval;
2506 $("requestQueueSize").value = pref.request_queue_size;
2507 $("dhtBootstrapNodes").value = pref.dht_bootstrap_nodes;
2508 $("i2pInboundQuantity").value = pref.i2p_inbound_quantity;
2509 $("i2pOutboundQuantity").value = pref.i2p_outbound_quantity;
2510 $("i2pInboundLength").value = pref.i2p_inbound_length;
2511 $("i2pOutboundLength").value = pref.i2p_outbound_length;
2516 const applyPreferences = function() {
2517 const settings = {};
2518 // Validate form data
2520 // Behavior tab
2521 LocalPreferences.set("full_url_tracker_column", document.getElementById("displayFullURLTrackerColumn").checked.toString());
2522 LocalPreferences.set("hide_zero_status_filters", document.getElementById("hideZeroFiltersCheckbox").checked.toString());
2523 LocalPreferences.set("dblclick_download", $("dblclickDownloadSelect").value);
2524 LocalPreferences.set("dblclick_complete", $("dblclickCompleteSelect").value);
2525 LocalPreferences.set("use_alt_row_colors", document.getElementById("useAltRowColorsInput").checked.toString());
2526 settings["file_log_enabled"] = $("filelog_checkbox").checked;
2527 settings["file_log_path"] = $("filelog_save_path_input").value;
2528 settings["file_log_backup_enabled"] = $("filelog_backup_checkbox").checked;
2529 settings["file_log_max_size"] = Number($("filelog_max_size_input").value);
2530 settings["file_log_delete_old"] = $("filelog_delete_old_checkbox").checked;
2531 settings["file_log_age"] = Number($("filelog_age_input").value);
2532 settings["file_log_age_type"] = Number($("filelog_age_type_select").value);
2534 // Downloads tab
2535 // When adding a torrent
2536 settings["torrent_content_layout"] = $("contentlayout_select").getSelected()[0].value;
2537 settings["add_to_top_of_queue"] = $("addToTopOfQueueCheckbox").checked;
2538 settings["add_stopped_enabled"] = $("dontstartdownloads_checkbox").checked;
2539 settings["torrent_stop_condition"] = $("stopConditionSelect").getSelected()[0].value;
2540 settings["merge_trackers"] = document.getElementById("mergeTrackersInput").checked;
2541 settings["auto_delete_mode"] = Number($("deletetorrentfileafter_checkbox").checked);
2543 settings["preallocate_all"] = $("preallocateall_checkbox").checked;
2544 settings["incomplete_files_ext"] = $("appendext_checkbox").checked;
2545 settings["use_unwanted_folder"] = $("unwantedfolder_checkbox").checked;
2547 // Saving Management
2548 settings["auto_tmm_enabled"] = ($("default_tmm_combobox").value === "true");
2549 settings["torrent_changed_tmm_enabled"] = ($("torrent_changed_tmm_combobox").value === "true");
2550 settings["save_path_changed_tmm_enabled"] = ($("save_path_changed_tmm_combobox").value === "true");
2551 settings["category_changed_tmm_enabled"] = ($("category_changed_tmm_combobox").value === "true");
2552 settings["use_subcategories"] = $("use_subcategories_checkbox").checked;
2553 settings["use_category_paths_in_manual_mode"] = document.getElementById("categoryPathsManualModeCheckbox").checked;
2554 settings["save_path"] = $("savepath_text").value;
2555 settings["temp_path_enabled"] = $("temppath_checkbox").checked;
2556 settings["temp_path"] = $("temppath_text").value;
2557 if ($("exportdir_checkbox").checked)
2558 settings["export_dir"] = $("exportdir_text").value;
2559 else
2560 settings["export_dir"] = "";
2561 if ($("exportdirfin_checkbox").checked)
2562 settings["export_dir_fin"] = $("exportdirfin_text").value;
2563 else
2564 settings["export_dir_fin"] = "";
2566 // Automatically add torrents from
2567 settings["scan_dirs"] = getWatchedFolders();
2569 // Excluded file names
2570 settings["excluded_file_names_enabled"] = $("excludedFileNamesCheckbox").checked;
2571 settings["excluded_file_names"] = $("excludedFileNamesTextarea").value;
2573 // Email notification upon download completion
2574 settings["mail_notification_enabled"] = $("mail_notification_checkbox").checked;
2575 settings["mail_notification_sender"] = $("src_email_txt").value;
2576 settings["mail_notification_email"] = $("dest_email_txt").value;
2577 settings["mail_notification_smtp"] = $("smtp_server_txt").value;
2578 settings["mail_notification_ssl_enabled"] = $("mail_ssl_checkbox").checked;
2579 settings["mail_notification_auth_enabled"] = $("mail_auth_checkbox").checked;
2580 settings["mail_notification_username"] = $("mail_username_text").value;
2581 settings["mail_notification_password"] = $("mail_password_text").value;
2583 // Run an external program on torrent added
2584 settings["autorun_on_torrent_added_enabled"] = $("autorunOnTorrentAddedCheckbox").checked;
2585 settings["autorun_on_torrent_added_program"] = $("autorunOnTorrentAddedProgram").value;
2586 // Run an external program on torrent finished
2587 settings["autorun_enabled"] = $("autorun_checkbox").checked;
2588 settings["autorun_program"] = $("autorunProg_txt").value;
2590 // Connection tab
2591 // Listening Port
2592 const listen_port = $("port_value").value.toInt();
2593 if (isNaN(listen_port) || (listen_port < 0) || (listen_port > 65535)) {
2594 alert("QBT_TR(The port used for incoming connections must be between 0 and 65535.)QBT_TR[CONTEXT=HttpServer]");
2595 return;
2597 settings["listen_port"] = listen_port;
2598 settings["upnp"] = $("upnp_checkbox").checked;
2600 // Connections Limits
2601 let max_connec = -1;
2602 if ($("max_connec_checkbox").checked) {
2603 max_connec = $("max_connec_value").value.toInt();
2604 if (isNaN(max_connec) || (max_connec <= 0)) {
2605 alert("QBT_TR(Maximum number of connections limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2606 return;
2609 settings["max_connec"] = max_connec;
2610 let max_connec_per_torrent = -1;
2611 if ($("max_connec_per_torrent_checkbox").checked) {
2612 max_connec_per_torrent = $("max_connec_per_torrent_value").value.toInt();
2613 if (isNaN(max_connec_per_torrent) || (max_connec_per_torrent <= 0)) {
2614 alert("QBT_TR(Maximum number of connections per torrent limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2615 return;
2618 settings["max_connec_per_torrent"] = max_connec_per_torrent;
2619 let max_uploads = -1;
2620 if ($("max_uploads_checkbox").checked) {
2621 max_uploads = $("max_uploads_value").value.toInt();
2622 if (isNaN(max_uploads) || (max_uploads <= 0)) {
2623 alert("QBT_TR(Global number of upload slots limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2624 return;
2627 settings["max_uploads"] = max_uploads;
2628 let max_uploads_per_torrent = -1;
2629 if ($("max_uploads_per_torrent_checkbox").checked) {
2630 max_uploads_per_torrent = $("max_uploads_per_torrent_value").value.toInt();
2631 if (isNaN(max_uploads_per_torrent) || (max_uploads_per_torrent <= 0)) {
2632 alert("QBT_TR(Maximum number of upload slots per torrent limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2633 return;
2636 settings["max_uploads_per_torrent"] = max_uploads_per_torrent;
2638 // I2P
2639 settings["i2p_enabled"] = $("i2pEnabledCheckbox").checked;
2640 settings["i2p_address"] = $("i2pAddress").value;
2641 settings["i2p_port"] = $("i2pPort").value.toInt();
2642 settings["i2p_mixed_mode"] = $("i2pMixedMode").checked;
2644 // Proxy Server
2645 settings["proxy_type"] = $("peer_proxy_type_select").value;
2646 settings["proxy_ip"] = $("peer_proxy_host_text").value;
2647 settings["proxy_port"] = $("peer_proxy_port_value").value.toInt();
2648 settings["proxy_auth_enabled"] = $("peer_proxy_auth_checkbox").checked;
2649 settings["proxy_username"] = $("peer_proxy_username_text").value;
2650 settings["proxy_password"] = $("peer_proxy_password_text").value;
2651 settings["proxy_hostname_lookup"] = $("proxyHostnameLookupCheckbox").checked;
2652 settings["proxy_bittorrent"] = $("proxy_bittorrent_checkbox").checked;
2653 settings["proxy_peer_connections"] = $("use_peer_proxy_checkbox").checked;
2654 settings["proxy_rss"] = $("proxy_rss_checkbox").checked;
2655 settings["proxy_misc"] = $("proxy_misc_checkbox").checked;
2657 // IP Filtering
2658 settings["ip_filter_enabled"] = $("ipfilter_text_checkbox").checked;
2659 settings["ip_filter_path"] = $("ipfilter_text").value;
2660 settings["ip_filter_trackers"] = $("ipfilter_trackers_checkbox").checked;
2661 settings["banned_IPs"] = $("banned_IPs_textarea").value;
2663 // Speed tab
2664 // Global Rate Limits
2665 const up_limit = $("up_limit_value").value.toInt() * 1024;
2666 if (isNaN(up_limit) || (up_limit < 0)) {
2667 alert("QBT_TR(Global upload rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2668 return;
2670 settings["up_limit"] = up_limit;
2672 const dl_limit = $("dl_limit_value").value.toInt() * 1024;
2673 if (isNaN(dl_limit) || (dl_limit < 0)) {
2674 alert("QBT_TR(Global download rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2675 return;
2677 settings["dl_limit"] = dl_limit;
2679 // Alternative Global Rate Limits
2680 const alt_up_limit = $("alt_up_limit_value").value.toInt() * 1024;
2681 if (isNaN(alt_up_limit) || (alt_up_limit < 0)) {
2682 alert("QBT_TR(Alternative upload rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2683 return;
2685 settings["alt_up_limit"] = alt_up_limit;
2687 const alt_dl_limit = $("alt_dl_limit_value").value.toInt() * 1024;
2688 if (isNaN(alt_dl_limit) || (alt_dl_limit < 0)) {
2689 alert("QBT_TR(Alternative download rate limit must be greater than 0 or disabled.)QBT_TR[CONTEXT=HttpServer]");
2690 return;
2692 settings["alt_dl_limit"] = alt_dl_limit;
2694 settings["bittorrent_protocol"] = Number($("enable_protocol_combobox").value);
2695 settings["limit_utp_rate"] = $("limit_utp_rate_checkbox").checked;
2696 settings["limit_tcp_overhead"] = $("limit_tcp_overhead_checkbox").checked;
2697 settings["limit_lan_peers"] = $("limit_lan_peers_checkbox").checked;
2699 // Scheduler
2700 const scheduling_enabled = $("limitSchedulingCheckbox").checked;
2701 settings["scheduler_enabled"] = scheduling_enabled;
2702 if (scheduling_enabled) {
2703 settings["schedule_from_hour"] = $("schedule_from_hour").value.toInt();
2704 settings["schedule_from_min"] = $("schedule_from_min").value.toInt();
2705 settings["schedule_to_hour"] = $("schedule_to_hour").value.toInt();
2706 settings["schedule_to_min"] = $("schedule_to_min").value.toInt();
2707 settings["scheduler_days"] = $("schedule_freq_select").value.toInt();
2710 // Bittorrent tab
2711 // Privacy
2712 settings["dht"] = $("dht_checkbox").checked;
2713 settings["pex"] = $("pex_checkbox").checked;
2714 settings["lsd"] = $("lsd_checkbox").checked;
2715 settings["encryption"] = Number($("encryption_select").getSelected()[0].value);
2716 settings["anonymous_mode"] = $("anonymous_mode_checkbox").checked;
2718 settings["max_active_checking_torrents"] = Number($("maxActiveCheckingTorrents").value);
2720 // Torrent Queueing
2721 settings["queueing_enabled"] = $("queueing_checkbox").checked;
2722 if ($("queueing_checkbox").checked) {
2723 const max_active_downloads = $("max_active_dl_value").value.toInt();
2724 if (isNaN(max_active_downloads) || (max_active_downloads < -1)) {
2725 alert("QBT_TR(Maximum active downloads must be greater than -1.)QBT_TR[CONTEXT=HttpServer]");
2726 return;
2728 settings["max_active_downloads"] = max_active_downloads;
2729 const max_active_uploads = $("max_active_up_value").value.toInt();
2730 if (isNaN(max_active_uploads) || (max_active_uploads < -1)) {
2731 alert("QBT_TR(Maximum active uploads must be greater than -1.)QBT_TR[CONTEXT=HttpServer]");
2732 return;
2734 settings["max_active_uploads"] = max_active_uploads;
2735 const max_active_torrents = $("max_active_to_value").value.toInt();
2736 if (isNaN(max_active_torrents) || (max_active_torrents < -1)) {
2737 alert("QBT_TR(Maximum active torrents must be greater than -1.)QBT_TR[CONTEXT=HttpServer]");
2738 return;
2740 settings["max_active_torrents"] = max_active_torrents;
2741 settings["dont_count_slow_torrents"] = $("dont_count_slow_torrents_checkbox").checked;
2742 const dl_rate_threshold = $("dl_rate_threshold").value.toInt();
2743 if (isNaN(dl_rate_threshold) || (dl_rate_threshold < 1)) {
2744 alert("QBT_TR(Download rate threshold must be greater than 0.)QBT_TR[CONTEXT=HttpServer]");
2745 return;
2747 settings["slow_torrent_dl_rate_threshold"] = dl_rate_threshold;
2748 const ul_rate_threshold = $("ul_rate_threshold").value.toInt();
2749 if (isNaN(ul_rate_threshold) || (ul_rate_threshold < 1)) {
2750 alert("QBT_TR(Upload rate threshold must be greater than 0.)QBT_TR[CONTEXT=HttpServer]");
2751 return;
2753 settings["slow_torrent_ul_rate_threshold"] = ul_rate_threshold;
2754 const torrent_inactive_timer = $("torrent_inactive_timer").value.toInt();
2755 if (isNaN(torrent_inactive_timer) || (torrent_inactive_timer < 1)) {
2756 alert("QBT_TR(Torrent inactivity timer must be greater than 0.)QBT_TR[CONTEXT=HttpServer]");
2757 return;
2759 settings["slow_torrent_inactive_timer"] = torrent_inactive_timer;
2762 // Share Ratio Limiting
2763 let max_ratio = -1;
2764 if ($("max_ratio_checkbox").checked) {
2765 max_ratio = $("max_ratio_value").value.toFloat();
2766 if (isNaN(max_ratio) || (max_ratio < 0) || (max_ratio > 9998)) {
2767 alert("QBT_TR(Share ratio limit must be between 0 and 9998.)QBT_TR[CONTEXT=HttpServer]");
2768 return;
2771 settings["max_ratio_enabled"] = $("max_ratio_checkbox").checked;
2772 settings["max_ratio"] = max_ratio;
2774 let max_seeding_time = -1;
2775 if ($("max_seeding_time_checkbox").checked) {
2776 max_seeding_time = $("max_seeding_time_value").value.toInt();
2777 if (isNaN(max_seeding_time) || (max_seeding_time < 0) || (max_seeding_time > 525600)) {
2778 alert("QBT_TR(Seeding time limit must be between 0 and 525600 minutes.)QBT_TR[CONTEXT=HttpServer]");
2779 return;
2782 settings["max_seeding_time_enabled"] = $("max_seeding_time_checkbox").checked;
2783 settings["max_seeding_time"] = max_seeding_time;
2784 settings["max_ratio_act"] = $("max_ratio_act").value.toInt();
2786 let max_inactive_seeding_time = -1;
2787 if ($("max_inactive_seeding_time_checkbox").checked) {
2788 max_inactive_seeding_time = $("max_inactive_seeding_time_value").value.toInt();
2789 if (isNaN(max_inactive_seeding_time) || (max_inactive_seeding_time < 0) || (max_inactive_seeding_time > 525600)) {
2790 alert("QBT_TR(Seeding time limit must be between 0 and 525600 minutes.)QBT_TR[CONTEXT=HttpServer]");
2791 return;
2794 settings["max_inactive_seeding_time_enabled"] = $("max_inactive_seeding_time_checkbox").checked;
2795 settings["max_inactive_seeding_time"] = max_inactive_seeding_time;
2796 settings["max_ratio_act"] = $("max_ratio_act").value.toInt();
2798 // Add trackers
2799 settings["add_trackers_enabled"] = $("add_trackers_checkbox").checked;
2800 settings["add_trackers"] = $("add_trackers_textarea").value;
2802 // RSS Tab
2803 settings["rss_processing_enabled"] = $("enable_fetching_rss_feeds_checkbox").checked;
2804 settings["rss_refresh_interval"] = Number($("feed_refresh_interval").value);
2805 settings["rss_fetch_delay"] = Number($("feedFetchDelay").value);
2806 settings["rss_max_articles_per_feed"] = Number($("maximum_article_number").value);
2807 settings["rss_auto_downloading_enabled"] = $("enable_auto_downloading_rss_torrents_checkbox").checked;
2808 settings["rss_download_repack_proper_episodes"] = $("downlock_repack_proper_episodes").checked;
2809 settings["rss_smart_episode_filters"] = $("rss_filter_textarea").value;
2811 // WebUI tab
2812 // Language
2813 settings["locale"] = $("locale_select").value;
2814 settings["performance_warning"] = $("performanceWarning").checked;
2816 // HTTP Server
2817 settings["web_ui_domain_list"] = $("webui_domain_textarea").value;
2818 const web_ui_address = $("webui_address_value").value.toString();
2819 const web_ui_port = $("webui_port_value").value.toInt();
2820 if (isNaN(web_ui_port) || (web_ui_port < 1) || (web_ui_port > 65535)) {
2821 alert("QBT_TR(The port used for the WebUI must be between 1 and 65535.)QBT_TR[CONTEXT=HttpServer]");
2822 return;
2824 settings["web_ui_address"] = web_ui_address;
2825 settings["web_ui_port"] = web_ui_port;
2826 settings["web_ui_upnp"] = $("webui_upnp_checkbox").checked;
2828 const useHTTPS = $("use_https_checkbox").checked;
2829 settings["use_https"] = useHTTPS;
2831 const httpsCertificate = $("ssl_cert_text").value;
2832 settings["web_ui_https_cert_path"] = httpsCertificate;
2833 if (useHTTPS && (httpsCertificate.length === 0)) {
2834 alert("QBT_TR(HTTPS certificate should not be empty)QBT_TR[CONTEXT=OptionsDialog]");
2835 return;
2838 const httpsKey = $("ssl_key_text").value;
2839 settings["web_ui_https_key_path"] = httpsKey;
2840 if (useHTTPS && (httpsKey.length === 0)) {
2841 alert("QBT_TR(HTTPS key should not be empty)QBT_TR[CONTEXT=OptionsDialog]");
2842 return;
2845 // Authentication
2846 const web_ui_username = $("webui_username_text").value;
2847 if (web_ui_username.length < 3) {
2848 alert("QBT_TR(The WebUI username must be at least 3 characters long.)QBT_TR[CONTEXT=OptionsDialog]");
2849 return;
2851 const web_ui_password = $("webui_password_text").value;
2852 if ((0 < web_ui_password.length) && (web_ui_password.length < 6)) {
2853 alert("QBT_TR(The WebUI password must be at least 6 characters long.)QBT_TR[CONTEXT=OptionsDialog]");
2854 return;
2857 settings["web_ui_username"] = web_ui_username;
2858 if (web_ui_password.length > 0)
2859 settings["web_ui_password"] = web_ui_password;
2860 settings["bypass_local_auth"] = $("bypass_local_auth_checkbox").checked;
2861 settings["bypass_auth_subnet_whitelist_enabled"] = $("bypass_auth_subnet_whitelist_checkbox").checked;
2862 settings["bypass_auth_subnet_whitelist"] = $("bypass_auth_subnet_whitelist_textarea").value;
2863 settings["web_ui_max_auth_fail_count"] = Number($("webUIMaxAuthFailCountInput").value);
2864 settings["web_ui_ban_duration"] = Number($("webUIBanDurationInput").value);
2865 settings["web_ui_session_timeout"] = Number($("webUISessionTimeoutInput").value);
2867 // Use alternative WebUI
2868 const alternative_webui_enabled = $("use_alt_webui_checkbox").checked;
2869 const webui_files_location_textarea = $("webui_files_location_textarea").value;
2870 if (alternative_webui_enabled && (webui_files_location_textarea.trim() === "")) {
2871 alert("QBT_TR(The alternative WebUI files location cannot be blank.)QBT_TR[CONTEXT=OptionsDialog]");
2872 return;
2874 settings["alternative_webui_enabled"] = alternative_webui_enabled;
2875 settings["alternative_webui_path"] = webui_files_location_textarea;
2877 // Security
2878 settings["web_ui_clickjacking_protection_enabled"] = $("clickjacking_protection_checkbox").checked;
2879 settings["web_ui_csrf_protection_enabled"] = $("csrf_protection_checkbox").checked;
2880 settings["web_ui_secure_cookie_enabled"] = $("secureCookieCheckbox").checked;
2881 settings["web_ui_host_header_validation_enabled"] = $("host_header_validation_checkbox").checked;
2883 // Custom HTTP headers
2884 settings["web_ui_use_custom_http_headers_enabled"] = $("webUIUseCustomHTTPHeadersCheckbox").checked;
2885 settings["web_ui_custom_http_headers"] = $("webUICustomHTTPHeadersTextarea").value;
2887 // Reverse Proxy
2888 settings["web_ui_reverse_proxy_enabled"] = $("webUIReverseProxySupportCheckbox").checked;
2889 settings["web_ui_reverse_proxies_list"] = $("webUIReverseProxiesListTextarea").value;
2891 // Update my dynamic domain name
2892 settings["dyndns_enabled"] = $("use_dyndns_checkbox").checked;
2893 settings["dyndns_service"] = Number($("dyndns_select").value);
2894 settings["dyndns_domain"] = $("dyndns_domain_text").value;
2895 settings["dyndns_username"] = $("dyndns_username_text").value;
2896 settings["dyndns_password"] = $("dyndns_password_text").value;
2898 // Update advanced settings
2899 // qBittorrent section
2900 settings["resume_data_storage_type"] = $("resumeDataStorageType").value;
2901 settings["torrent_content_remove_option"] = $("torrentContentRemoveOption").value;
2902 settings["memory_working_set_limit"] = Number($("memoryWorkingSetLimit").value);
2903 settings["current_network_interface"] = $("networkInterface").value;
2904 settings["current_interface_address"] = $("optionalIPAddressToBind").value;
2905 settings["save_resume_data_interval"] = Number($("saveResumeDataInterval").value);
2906 settings["torrent_file_size_limit"] = ($("torrentFileSizeLimit").value * 1024 * 1024);
2907 settings["recheck_completed_torrents"] = $("recheckTorrentsOnCompletion").checked;
2908 settings["app_instance_name"] = $("appInstanceName").value;
2909 settings["refresh_interval"] = Number($("refreshInterval").value);
2910 settings["resolve_peer_countries"] = $("resolvePeerCountries").checked;
2911 settings["reannounce_when_address_changed"] = $("reannounceWhenAddressChanged").checked;
2913 // libtorrent section
2914 settings["bdecode_depth_limit"] = Number($("bdecodeDepthLimit").value);
2915 settings["bdecode_token_limit"] = Number($("bdecodeTokenLimit").value);
2916 settings["async_io_threads"] = Number($("asyncIOThreads").value);
2917 settings["hashing_threads"] = Number($("hashingThreads").value);
2918 settings["file_pool_size"] = Number($("filePoolSize").value);
2919 settings["checking_memory_use"] = Number($("outstandMemoryWhenCheckingTorrents").value);
2920 settings["disk_cache"] = Number($("diskCache").value);
2921 settings["disk_cache_ttl"] = Number($("diskCacheExpiryInterval").value);
2922 settings["disk_queue_size"] = (Number($("diskQueueSize").value) * 1024);
2923 settings["disk_io_type"] = Number($("diskIOType").value);
2924 settings["disk_io_read_mode"] = Number($("diskIOReadMode").value);
2925 settings["disk_io_write_mode"] = Number($("diskIOWriteMode").value);
2926 settings["enable_coalesce_read_write"] = $("coalesceReadsAndWrites").checked;
2927 settings["enable_piece_extent_affinity"] = $("pieceExtentAffinity").checked;
2928 settings["enable_upload_suggestions"] = $("sendUploadPieceSuggestions").checked;
2929 settings["send_buffer_watermark"] = Number($("sendBufferWatermark").value);
2930 settings["send_buffer_low_watermark"] = Number($("sendBufferLowWatermark").value);
2931 settings["send_buffer_watermark_factor"] = Number($("sendBufferWatermarkFactor").value);
2932 settings["connection_speed"] = Number($("connectionSpeed").value);
2933 settings["socket_send_buffer_size"] = ($("socketSendBufferSize").value * 1024);
2934 settings["socket_receive_buffer_size"] = ($("socketReceiveBufferSize").value * 1024);
2935 settings["socket_backlog_size"] = Number($("socketBacklogSize").value);
2936 settings["outgoing_ports_min"] = Number($("outgoingPortsMin").value);
2937 settings["outgoing_ports_max"] = Number($("outgoingPortsMax").value);
2938 settings["upnp_lease_duration"] = Number($("UPnPLeaseDuration").value);
2939 settings["peer_tos"] = Number($("peerToS").value);
2940 settings["utp_tcp_mixed_mode"] = Number($("utpTCPMixedModeAlgorithm").value);
2941 settings["idn_support_enabled"] = $("IDNSupportCheckbox").checked;
2942 settings["enable_multi_connections_from_same_ip"] = $("allowMultipleConnectionsFromTheSameIPAddress").checked;
2943 settings["validate_https_tracker_certificate"] = $("validateHTTPSTrackerCertificate").checked;
2944 settings["ssrf_mitigation"] = $("mitigateSSRF").checked;
2945 settings["block_peers_on_privileged_ports"] = $("blockPeersOnPrivilegedPorts").checked;
2946 settings["enable_embedded_tracker"] = $("enableEmbeddedTracker").checked;
2947 settings["embedded_tracker_port"] = Number($("embeddedTrackerPort").value);
2948 settings["embedded_tracker_port_forwarding"] = $("embeddedTrackerPortForwarding").checked;
2949 settings["mark_of_the_web"] = $("markOfTheWeb").checked;
2950 settings["python_executable_path"] = $("pythonExecutablePath").value;
2951 settings["upload_slots_behavior"] = Number($("uploadSlotsBehavior").value);
2952 settings["upload_choking_algorithm"] = Number($("uploadChokingAlgorithm").value);
2953 settings["announce_to_all_trackers"] = $("announceAllTrackers").checked;
2954 settings["announce_to_all_tiers"] = $("announceAllTiers").checked;
2955 settings["announce_ip"] = $("announceIP").value;
2956 settings["max_concurrent_http_announces"] = Number($("maxConcurrentHTTPAnnounces").value);
2957 settings["stop_tracker_timeout"] = Number($("stopTrackerTimeout").value);
2958 settings["peer_turnover"] = Number($("peerTurnover").value);
2959 settings["peer_turnover_cutoff"] = Number($("peerTurnoverCutoff").value);
2960 settings["peer_turnover_interval"] = Number($("peerTurnoverInterval").value);
2961 settings["request_queue_size"] = Number($("requestQueueSize").value);
2962 settings["dht_bootstrap_nodes"] = $("dhtBootstrapNodes").value;
2963 settings["i2p_inbound_quantity"] = Number($("i2pInboundQuantity").value);
2964 settings["i2p_outbound_quantity"] = Number($("i2pOutboundQuantity").value);
2965 settings["i2p_inbound_length"] = Number($("i2pInboundLength").value);
2966 settings["i2p_outbound_length"] = Number($("i2pOutboundLength").value);
2968 // Send it to qBT
2969 window.parent.qBittorrent.Cache.preferences.set({
2970 data: settings,
2971 onFailure: function() {
2972 alert("QBT_TR(Unable to save program preferences, qBittorrent is probably unreachable.)QBT_TR[CONTEXT=HttpServer]");
2973 window.parent.qBittorrent.Client.closeWindows();
2975 onSuccess: function() {
2976 // Close window
2977 window.parent.location.reload();
2978 window.parent.qBittorrent.Client.closeWindows();
2983 const setup = () => {
2984 watchedFoldersTable = new HtmlTable($("watched_folders_tab"));
2986 const buildInfo = window.qBittorrent.Cache.buildInfo.get();
2988 // hide entries
2989 const libtorrentVersion = window.qBittorrent.Misc.parseVersion(buildInfo.libtorrent);
2990 if (libtorrentVersion.valid) {
2991 if (libtorrentVersion.major >= 2) {
2992 $("rowDiskCache").style.display = "none";
2993 $("rowDiskCacheExpiryInterval").style.display = "none";
2994 $("rowCoalesceReadsAndWrites").style.display = "none";
2996 else {
2997 $("fieldsetI2p").style.display = "none";
2998 $("rowMemoryWorkingSetLimit").style.display = "none";
2999 $("rowHashingThreads").style.display = "none";
3000 $("rowDiskIOType").style.display = "none";
3001 $("rowI2pInboundQuantity").style.display = "none";
3002 $("rowI2pOutboundQuantity").style.display = "none";
3003 $("rowI2pInboundLength").style.display = "none";
3004 $("rowI2pOutboundLength").style.display = "none";
3007 if (!((libtorrentVersion.major >= 2) && (libtorrentVersion.minor >= 0) && (libtorrentVersion.fix >= 6)))
3008 $("diskIOWriteModeWriteThrough").style.display = "none";
3011 if ((buildInfo.platform !== "macos") && (buildInfo.platform !== "windows"))
3012 $("rowMarkOfTheWeb").style.display = "none";
3014 $("networkInterface").addEventListener("change", function() {
3015 updateInterfaceAddresses($(this).value, "");
3018 loadPreferences();
3020 window.qBittorrent.pathAutofill.attachPathAutofill();
3023 return exports();
3024 })();
3025 Object.freeze(window.qBittorrent.Preferences);
3027 window.qBittorrent.Preferences.setup();
3028 </script>