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