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