forked from qbittorrent/qBittorrent
/
preferences_content.html
1746 lines (1621 loc) · 89.9 KB
/
preferences_content.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<div id="DownloadsTab" class="PrefTab">
<fieldset class="settings">
<legend>QBT_TR(When adding a torrent)QBT_TR[CONTEXT=OptionsDialog]</legend>
<div class="formRow">
<input type="checkbox" id="createsubfolder_checkbox" />
<label for="createsubfolder_checkbox">QBT_TR(Create subfolder for torrents with multiple files)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<input type="checkbox" id="dontstartdownloads_checkbox" />
<label for="dontstartauto_checkbox">QBT_TR(Do not start the download automatically)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<input type="checkbox" id="deletetorrentfileafter_checkbox" />
<label for="deletetorrentafter_checkbox">QBT_TR(Delete .torrent files afterwards)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
</fieldset>
<div class="formRow">
<input type="checkbox" id="preallocateall_checkbox" />
<label for="preallocateall_checkbox">QBT_TR(Pre-allocate disk space for all files)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<span id="appendexttr">
<input type="checkbox" id="appendext_checkbox"/>
<label for="appendext_checkbox">QBT_TR(Append .!qB extension to incomplete files)QBT_TR[CONTEXT=OptionsDialog]</label>
</span>
</div>
<fieldset class="settings">
<legend>QBT_TR(Saving Management)QBT_TR[CONTEXT=HttpServer]</legend>
<table>
<tr>
<td>
<label>QBT_TR(Default Torrent Management Mode:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<select id="default_tmm_combobox">
<option value="false" selected>QBT_TR(Manual)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="true">QBT_TR(Automatic)QBT_TR[CONTEXT=OptionsDialog]</option>
</select>
</td>
</tr>
<tr>
<td>
<label>QBT_TR(When Torrent Category changed:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<select id="torrent_changed_tmm_combobox">
<option value="true">QBT_TR(Relocate torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="false" selected>QBT_TR(Switch torrent to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]</option>
</select>
</td>
</tr>
<tr>
<td>
<label>QBT_TR(When Default Save Path changed:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<select id="save_path_changed_tmm_combobox">
<option value="true">QBT_TR(Relocate affected torrents)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="false" selected>QBT_TR(Switch affected torrents to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]</option>
</select>
</td>
</tr>
<tr>
<td>
<label>QBT_TR(When Category Save Path changed:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<select id="category_changed_tmm_combobox">
<option value="true">QBT_TR(Relocate affected torrents)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="false" selected>QBT_TR(Switch affected torrents to Manual Mode)QBT_TR[CONTEXT=OptionsDialog]</option>
</select>
</td>
</tr>
</table>
<table>
<tr>
<td>
<label for="savepath_text">QBT_TR(Default Save Path:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="savepath_text" />
</td>
</tr>
<tr>
<td>
<input type="checkbox" id="temppath_checkbox" onclick="updateTempDirEnabled();" />
<label for="temppath_checkbox" >QBT_TR(Keep incomplete torrents in:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="temppath_text" />
</td>
</tr>
<tr>
<td>
<input type="checkbox" id="exportdir_checkbox" onclick="updateExportDirEnabled();" />
<label for="exportdir_checkbox" >QBT_TR(Copy .torrent files to:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="exportdir_text" />
</td>
</tr>
<tr>
<td>
<input type="checkbox" id="exportdirfin_checkbox" onclick="updateExportDirFinEnabled();" />
<label for="exportdirfin_checkbox" >QBT_TR(Copy .torrent files for finished downloads to:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="exportdirfin_text" />
</td>
</tr>
</table>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Automatically add torrents from:)QBT_TR[CONTEXT=OptionsDialog]</legend>
<table id="watched_folders_tab" style="border: 1px solid black;">
<thead>
<tr>
<th>QBT_TR(Monitored Folder)QBT_TR[CONTEXT=ScanFoldersModel]</th>
<th>QBT_TR(Override Save Location)QBT_TR[CONTEXT=ScanFoldersModel]</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<td style="padding-top:4px;"><input type="text" id="new_watch_folder_txt" /></td>
<td style="padding-top:4px;">
<div class="select-watched-folder-editable">
<select id="new_watch_folder_select" onchange="changeWatchFolderSelect(this)">
<option selected value="watch_folder">QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]</option>
<option value="default_folder">QBT_TR(Default save location)QBT_TR[CONTEXT=ScanFoldersModel]</option>
<option value="other">QBT_TR(Other...)QBT_TR[CONTEXT=HttpServer]</option>
</select>
<input id="new_watch_folder_other_txt" type="text" value="QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]" hidden />
<img src="images/qbt-theme/list-add.svg" alt="Add" style="padding-left:170px;width:16px;cursor:pointer;" onclick="addWatchFolder();" />
</div>
</td>
</tr>
</tfoot>
</table>
</fieldset>
<fieldset class="settings">
<legend>
<input type="checkbox" id="mail_notification_checkbox" onclick="updateMailNotification();" />
<label for="mail_notification_checkbox">QBT_TR(Email notification upon download completion)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<table>
<tr>
<td>
<label for="src_email_txt">QBT_TR(From:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="src_email_txt" />
</td>
</tr>
<tr>
<td>
<label for="dest_email_txt">QBT_TR(To:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="dest_email_txt" />
</td>
</tr>
<tr>
<td>
<label for="smtp_server_txt">QBT_TR(SMTP server:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="smtp_server_txt" />
</td>
</tr>
</table>
<div class="formRow">
<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>
</div>
<fieldset class="settings">
<legend>
<input type="checkbox" id="mail_auth_checkbox" onclick="updateMailAuthSettings();" />
<label for="mail_auth_checkbox">QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<table>
<tr>
<td>
<label for="mail_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="mail_username_text" />
</td>
</tr>
<tr>
<td>
<label for="mail_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="password" id="mail_password_text" />
</td>
</tr>
</table>
</fieldset>
</fieldset>
<fieldset class="settings">
<legend>
<input type="checkbox" id="autorun_checkbox" onclick="updateAutoRun();" />
<label for="autorun_checkbox">QBT_TR(Run external program on torrent completion)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<div class="formRow">
<input type="text" id="autorunProg_txt" style="width: 400px;" />
</div>
<div style="font-style: italic;">QBT_TR(Supported parameters (case sensitive):)QBT_TR[CONTEXT=OptionsDialog]
<ul>
<li>QBT_TR(%N: Torrent name)QBT_TR[CONTEXT=OptionsDialog]</li>
<li>QBT_TR(%L: Category)QBT_TR[CONTEXT=OptionsDialog]</li>
<li>QBT_TR(%G: Tags (separated by comma))QBT_TR[CONTEXT=OptionsDialog]</li>
<li>QBT_TR(%F: Content path (same as root path for multifile torrent))QBT_TR[CONTEXT=OptionsDialog]</li>
<li>QBT_TR(%R: Root path (first torrent subdirectory path))QBT_TR[CONTEXT=OptionsDialog]</li>
<li>QBT_TR(%D: Save path)QBT_TR[CONTEXT=OptionsDialog]</li>
<li>QBT_TR(%C: Number of files)QBT_TR[CONTEXT=OptionsDialog]</li>
<li>QBT_TR(%Z: Torrent size (bytes))QBT_TR[CONTEXT=OptionsDialog]</li>
<li>QBT_TR(%T: Current tracker)QBT_TR[CONTEXT=OptionsDialog]</li>
<li>QBT_TR(%I: Info hash)QBT_TR[CONTEXT=OptionsDialog]</li>
</ul>
QBT_TR(Tip: Encapsulate parameter with quotation marks to avoid text being cut off at whitespace (e.g., "%N"))QBT_TR[CONTEXT=OptionsDialog]
</div>
</fieldset>
<fieldset class="settings">
<legend>
RSS
</legend>
<div class="formRow">
<input type="checkbox" id="rss_fetch_checkbox">
<label for="rss_fetch_checkbox">Enable fetching RSS feeds</label>
</div>
<div class="formRow">
<label for="rss_fetch_interval_num">Feeds refresh interval</label>
<input type="number" id="rss_fetch_interval_num" style="width: 4em;" min="0">
</div>
<div class="formRow">
<label for="rss_max_articles_num">Max number of articles per feed</label>
<input type="number" id="rss_max_articles_num" style="width: 4em;" min="1">
</div>
<div class="formRow">
<input type="checkbox" id="rss_auto_downloading_checkbox">
<label for="rss_auto_downloading_checkbox">Enable auto downloading of RSS torrents</label>
</div>
</fieldset>
</div>
<div id="ConnectionTab" class="PrefTab invisible">
<div class="formRow">
<label>QBT_TR(Enabled protocol:)QBT_TR[CONTEXT=OptionsDialog]</label>
<select id="enable_protocol_combobox">
<option value="0" selected>QBT_TR(TCP and μTP)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="1">TCP</option>
<option value="2">μTP</option>
</select>
</div>
<fieldset class="settings">
<legend>QBT_TR(Listening Port)QBT_TR[CONTEXT=OptionsDialog]</legend>
<div class="formRow">
<label for="port_value">QBT_TR(Port used for incoming connections:)QBT_TR[CONTEXT=OptionsDialog]</label>
<input type="text" id="port_value" style="width: 4em;" />
<button style="margin-left: 1em;" onclick="generateRandomPort();">Random</button>
</div>
<div class="formRow">
<input type="checkbox" id="upnp_checkbox" />
<label for="upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP port forwarding from my router)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<input type="checkbox" id="random_port_checkbox" />
<label for="random_port_checkbox">QBT_TR(Use different port on each startup)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Connections Limits)QBT_TR[CONTEXT=OptionsDialog]</legend>
<table>
<tr>
<td>
<input type="checkbox" id="max_connec_checkbox" onclick="updateMaxConnecEnabled();" />
<label for="max_connec_checkbox">QBT_TR(Global maximum number of connections:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td><input type="text" id="max_connec_value" style="width: 4em;" /></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_connec_per_torrent_checkbox" onclick="updateMaxConnecPerTorrentEnabled();" />
<label for="max_connec_per_torrent_checkbox">QBT_TR(Maximum number of connections per torrent:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td><input type="text" id="max_connec_per_torrent_value" style="width: 4em;" /></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_uploads_checkbox" onclick="updateMaxUploadsEnabled();" />
<label for="max_uploads_checkbox">QBT_TR(Global maximum number of upload slots:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td><input type="text" id="max_uploads_value" style="width: 4em;" /></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_uploads_per_torrent_checkbox" onclick="updateMaxUploadsPerTorrentEnabled();" />
<label for="max_uploads_per_torrent_checkbox">QBT_TR(Maximum number of upload slots per torrent:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td><input type="text" id="max_uploads_per_torrent_value" style="width: 4em;" /></td>
</tr>
</table>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Proxy Server)QBT_TR[CONTEXT=OptionsDialog]</legend>
<table>
<tr>
<td>
<label for="peer_proxy_type_select">QBT_TR(Type:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<select id="peer_proxy_type_select" onchange="updatePeerProxySettings();">
<option value="none">QBT_TR((None))QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="socks4">QBT_TR(SOCKS4)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="socks5">QBT_TR(SOCKS5)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="http">QBT_TR(HTTP)QBT_TR[CONTEXT=OptionsDialog]</option>
</select>
</td>
<td>
<label for="peer_proxy_host_text">QBT_TR(Host:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="peer_proxy_host_text" />
</td>
<td>
<label for="peer_proxy_port_value">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="peer_proxy_port_value" style="width: 4em;" />
</td>
</tr>
</table>
<div class="formRow">
<input type="checkbox" id="use_peer_proxy_checkbox" />
<label for="use_peer_proxy_checkbox">QBT_TR(Use proxy for peer connections)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<input type="checkbox" id="force_proxy_checkbox" onclick="updateForceProxySettings();" />
<label for="force_proxy_checkbox">QBT_TR(Disable connections not supported by proxies)QBT_TR[CONTEXT=OptionsDialog] (<a target="_blank" href="https://github.com/qbittorrent/qBittorrent/wiki/Disable-connections-not-supported-by-proxies">QBT_TR(More information)QBT_TR[CONTEXT=HttpServer]</a>)</label>
</div>
<div class="formRow">
<input type="checkbox" id="proxy_only_for_torrents_checkbox" />
<label for="proxy_only_for_torrents_checkbox">QBT_TR(Use proxy only for torrents)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<fieldset class="settings">
<legend>
<input type="checkbox" id="peer_proxy_auth_checkbox" onclick="updatePeerProxyAuthSettings();" />
<label for="peer_proxy_auth_checkbox">QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<table>
<tr>
<td>
<label for="peer_proxy_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="peer_proxy_username_text" />
</td>
</tr>
<tr>
<td>
<label for="peer_proxy_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="password" id="peer_proxy_password_text" />
</td>
</tr>
</table>
<div class="formRow">
<span>Info: The password is saved unencrypted</span>
</div>
</fieldset>
</fieldset>
<fieldset class="settings">
<legend>
<input type="checkbox" id="ipfilter_enabled_checkbox" onclick="updateFilterSettings();" />
<label for="ipfilter_enabled_checkbox">QBT_TR(IP Filtering)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<div class="formRow">
<label for="ipfilter_text">QBT_TR(Filter path (.dat, .p2p, .p2b):)QBT_TR[CONTEXT=OptionsDialog]</label>
<input type="text" id="ipfilter_text" />
</div>
<div class="formRow">
<input type="checkbox" id="ipfilter_trackers_checkbox" />
<label for="ipfilter_trackers_checkbox">QBT_TR(Apply to trackers)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<fieldset class="settings">
<legend>QBT_TR(Manually banned IP addresses...)QBT_TR[CONTEXT=OptionsDialog]</legend>
<textarea id="banned_IPs_textarea" rows="5" cols="70"></textarea>
</fieldset>
</div>
</fieldset>
</div>
<div id="SpeedTab" class="PrefTab invisible">
<fieldset class="settings">
<legend>QBT_TR(Global Rate Limits)QBT_TR[CONTEXT=OptionsDialog]</legend>
<table>
<tr>
<td rowspan="2">
<img alt="QBT_TR(Alternative speed limits)QBT_TR[CONTEXT=MainWindow]" src="images/slow_off.png">
</td>
<td><label for="up_limit_value">QBT_TR(Upload:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
<td><input type="number" id="up_limit_value" style="width: 4em;" min="0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]</td>
</tr>
<tr>
<td><label for="dl_limit_value">QBT_TR(Download:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
<td><input type="number" id="dl_limit_value" style="width: 4em;" min="0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]</td>
</tr>
</table>
<i>QBT_TR(0 means unlimited)QBT_TR[CONTEXT=OptionsDialog]</i>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Alternative Rate Limits)QBT_TR[CONTEXT=OptionsDialog]</legend>
<table>
<tr>
<td rowspan="2">
<img alt="QBT_TR(Alternative speed limits)QBT_TR[CONTEXT=MainWindow]" src="images/slow.png">
</td>
<td><label for="alt_up_limit_value">QBT_TR(Upload:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
<td><input type="number" id="alt_up_limit_value" style="width: 4em;" min="0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]</td>
</tr>
<tr>
<td><label for="alt_dl_limit_value">QBT_TR(Download:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
<td><input type="number" id="alt_dl_limit_value" style="width: 4em;" min="0" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]</td>
</tr>
</table>
<i>QBT_TR(0 means unlimited)QBT_TR[CONTEXT=OptionsDialog]</i>
<fieldset class="settings">
<legend>
<input type="checkbox" id="limit_sheduling_checkbox" onclick="updateSchedulingEnabled();" />
<label for="limit_sheduling_checkbox">QBT_TR(Schedule the use of alternative rate limits)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<div class="formRow">
QBT_TR(From:)QBT_TR[CONTEXT=OptionsDialog]
<input type="text" id="schedule_from_hour" style="width: 1.5em;" />:<input type="text" id="schedule_from_min" style="width: 1.5em;" /> QBT_TR(To:)QBT_TR[CONTEXT=OptionsDialog]
<input type="text" id="schedule_to_hour" style="width: 1.5em;" />:<input type="text" id="schedule_to_min" style="width: 1.5em;" />
</div>
<div class="formRow">
QBT_TR(When:)QBT_TR[CONTEXT=OptionsDialog]
<select id="schedule_freq_select">
<option value="0">QBT_TR(Every day)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="1">QBT_TR(Weekdays)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="2">QBT_TR(Weekends)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="3">QBT_TR(Monday)QBT_TR[CONTEXT=HttpServer]</option>
<option value="4">QBT_TR(Tuesday)QBT_TR[CONTEXT=HttpServer]</option>
<option value="5">QBT_TR(Wednesday)QBT_TR[CONTEXT=HttpServer]</option>
<option value="6">QBT_TR(Thursday)QBT_TR[CONTEXT=HttpServer]</option>
<option value="7">QBT_TR(Friday)QBT_TR[CONTEXT=HttpServer]</option>
<option value="8">QBT_TR(Saturday)QBT_TR[CONTEXT=HttpServer]</option>
<option value="9">QBT_TR(Sunday)QBT_TR[CONTEXT=HttpServer]</option>
</select>
</div>
</fieldset>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Rate Limits Settings)QBT_TR[CONTEXT=OptionsDialog]</legend>
<div class="formRow">
<input type="checkbox" id="limit_utp_rate_checkbox" />
<label for="limit_utp_rate_checkbox">QBT_TR(Apply rate limit to µTP protocol)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<input type="checkbox" id="limit_tcp_overhead_checkbox" />
<label for="limit_tcp_overhead_checkbox">QBT_TR(Apply rate limit to transport overhead)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<input type="checkbox" id="limit_lan_peers_checkbox" />
<label for="limit_lan_peers_checkbox">QBT_TR(Apply rate limit to peers on LAN)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
</fieldset>
</div>
<div id="BittorrentTab" class="PrefTab invisible">
<fieldset class="settings">
<legend>QBT_TR(Privacy)QBT_TR[CONTEXT=OptionsDialog]</legend>
<div class="formRow">
<input type="checkbox" id="dht_checkbox" />
<label for="dht_checkbox">QBT_TR(Enable DHT (decentralized network) to find more peers)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<input type="checkbox" id="pex_checkbox" />
<label for="pex_checkbox">QBT_TR(Enable Peer Exchange (PeX) to find more peers)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<input type="checkbox" id="lsd_checkbox" />
<label for="lsd_checkbox">QBT_TR(Enable Local Peer Discovery to find more peers)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<label for="encryption_select">QBT_TR(Encryption mode:)QBT_TR[CONTEXT=OptionsDialog]</label>
<select id="encryption_select">
<option value="0">QBT_TR(Prefer encryption)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="1">QBT_TR(Require encryption)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="2">QBT_TR(Disable encryption)QBT_TR[CONTEXT=OptionsDialog]</option>
</select>
</div>
<div class="formRow">
<input type="checkbox" id="anonymous_mode_checkbox" />
<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>
</div>
</fieldset>
<fieldset class="settings">
<legend>
<input type="checkbox" id="queueing_checkbox" onclick="updateQueueingSystem();" />
<label for="queueing_checkbox">QBT_TR(Torrent Queueing)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<table>
<tr>
<td>
<label for="max_active_dl_value">QBT_TR(Maximum active downloads:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="max_active_dl_value" style="width: 4em;" />
</td>
</tr>
<tr>
<td>
<label for="max_active_up_value">QBT_TR(Maximum active uploads:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="max_active_up_value" style="width: 4em;" />
</td>
</tr>
<tr>
<td>
<label for="max_active_to_value">QBT_TR(Maximum active torrents:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="max_active_to_value" style="width: 4em;" />
</td>
</tr>
</table>
<fieldset class="settings">
<legend>
<input type="checkbox" id="dont_count_slow_torrents_checkbox" onclick="updateSlowTorrentsSettings();" />
<label for="dont_count_slow_torrents_checkbox">QBT_TR(Do not count slow torrents in these limits)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<table>
<tr>
<td>
<label for="dl_rate_threshold">QBT_TR(Download rate threshold:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="dl_rate_threshold" style="width: 4em;" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
</td>
</tr>
<tr>
<td>
<label for="ul_rate_threshold">QBT_TR(Upload rate threshold:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="ul_rate_threshold" style="width: 4em;" /> QBT_TR(KiB/s)QBT_TR[CONTEXT=OptionsDialog]
</td>
</tr>
<tr>
<td>
<label for="torrent_inactive_timer">QBT_TR(Torrent inactivity timer:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="torrent_inactive_timer" style="width: 4em;" /> QBT_TR(seconds)QBT_TR[CONTEXT=OptionsDialog]
</td>
</tr>
</table>
</fieldset>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Share Ratio Limiting)QBT_TR[CONTEXT=OptionsDialog]</legend>
<table>
<tr>
<td>
<input type="checkbox" id="max_ratio_checkbox" onclick="updateMaxRatioTimeEnabled();" />
<label for="max_ratio_checkbox">QBT_TR(Seed torrents until their ratio reaches)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="max_ratio_value" style="width: 4em;" />
</td>
<tr>
<td>
<input type="checkbox" id="max_seeding_time_checkbox" onclick="updateMaxRatioTimeEnabled();" />
<label for="max_seeding_time_checkbox">QBT_TR(Seed torrents until their seeding time reaches)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="max_seeding_time_value" style="width: 4em;" /> QBT_TR(minutes)QBT_TR[CONTEXT=OptionsDialog]
</td>
</tr>
<tr>
<td style="text-align: right;">
QBT_TR(then)QBT_TR[CONTEXT=OptionsDialog]
</td>
<td>
<select id="max_ratio_act">
<option value="0">QBT_TR(Pause them)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="1">QBT_TR(Remove them)QBT_TR[CONTEXT=OptionsDialog]</option>
</select>
</td>
</tr>
</table>
</fieldset>
<fieldset class="settings">
<legend>
<input type="checkbox" id="add_trackers_checkbox" onclick="updateAddTrackersEnabled();" />
<label for="add_trackers_checkbox">QBT_TR(Automatically add these trackers to new downloads:)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<textarea id="add_trackers_textarea" rows="5" cols="70"></textarea>
</fieldset>
</div>
<div id="WebUITab" class="PrefTab invisible">
<fieldset class="settings">
<legend>QBT_TR(Language)QBT_TR[CONTEXT=OptionsDialog]</legend>
<label for="locale_select">QBT_TR(User Interface Language:)QBT_TR[CONTEXT=OptionsDialog]</label>
<select id="locale_select">
<option value="en">English</option>
<option value="en_AU">English(Australia)</option>
<option value="en_GB">English(United Kingdom)</option>
<option value="eo_EO">Esperanto</option>
<option value="fr_FR">Français</option>
<option value="de_DE">Deutsch</option>
<option value="hu_HU">Magyar</option>
<option value="is">Íslenska</option>
<option value="id">Bahasa Indonesia</option>
<option value="it_IT">Italiano</option>
<option value="nl_NL">Nederlands</option>
<option value="es_ES">Español</option>
<option value="ca_ES">Català</option>
<option value="gl_ES">Galego</option>
<option value="oc">lenga d'òc</option>
<option value="pt_BR">Português brasileiro</option>
<option value="pt_PT">Português</option>
<option value="pl_PL">Polski</option>
<option value="lv_LV">latviešu valoda</option>
<option value="lt_LT">Lietuvių</option>
<option value="ms_MY">بهاس ملايو</option>
<option value="cs_CZ">Čeština</option>
<option value="sk_SK">Slovenčina</option>
<option value="sl_SI">Slovenščina</option>
<option value="sr_CS">Српски</option>
<option value="hi_IN">हिन्दी, हिंदी</option>
<option value="hr_HR">Hrvatski</option>
<option value="hy_AM">Հայերեն</option>
<option value="ro_RO">Română</option>
<option value="tr_TR">Türkçe</option>
<option value="el_GR">Ελληνικά</option>
<option value="sv_SE">Svenska</option>
<option value="fi_FI">Suomi</option>
<option value="nb_NO">Norsk</option>
<option value="da_DK">Dansk</option>
<option value="bg_BG">Български</option>
<option value="uk_UA">Українська</option>
<option value="uz@Latn">أۇزبېك</option>
<option value="ru_RU">Русский</option>
<option value="ja_JP">日本語</option>
<option value="he_IL">עברית</option>
<option value="ar_AE">عربي</option>
<option value="ka_GE">ქართული</option>
<option value="be_BY">Беларуская</option>
<option value="eu_ES">Euskara</option>
<option value="vi_VN">tiếng Việt</option>
<option value="zh">简体中文</option>
<option value="zh_TW">正體中文</option>
<option value="zh_HK">香港正體字</option>
<option value="ko_KR">한글</option>
</select>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Web User Interface (Remote control))QBT_TR[CONTEXT=OptionsDialog]</legend>
<table>
<tr>
<td>
<label for="webui_address_value">QBT_TR(IP address:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="webui_address_value" />
<label for="webui_port_value" style="margin-left: 10px;">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]</label>
<input type="text" id="webui_port_value" style="width: 4em;" />
</td>
</tr>
</table>
<div class="formRow">
<input type="checkbox" id="webui_upnp_checkbox" />
<label for="webui_upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP to forward the port from my router)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<fieldset class="settings">
<legend>
<input type="checkbox" id="use_https_checkbox" onclick="updateHttpsSettings();" />
<label for="use_https_checkbox">QBT_TR(Use HTTPS instead of HTTP)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<table>
<tr>
<td>
<label for="ssl_key_textarea">QBT_TR(Key:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<textarea id="ssl_key_textarea" rows="5" cols="70"></textarea>
</td>
</tr>
<tr>
<td>
<label for="ssl_cert_textarea">QBT_TR(Certificate:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<textarea id="ssl_cert_textarea" rows="5" cols="70"></textarea>
</td>
</tr>
</table>
<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>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Authentication)QBT_TR[CONTEXT=OptionsDialog]</legend>
<table>
<tr>
<td>
<label for="webui_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="webui_username_text" />
</td>
</tr>
<tr>
<td>
<label for="webui_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="password" id="webui_password_text" placeholder="QBT_TR(Change current password)QBT_TR[CONTEXT=OptionsDialog]" />
</td>
</tr>
</table>
<div class="formRow">
<input type="checkbox" id="bypass_local_auth_checkbox" />
<label for="bypass_local_auth_checkbox">QBT_TR(Bypass authentication for clients on localhost)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<input type="checkbox" id="bypass_auth_subnet_whitelist_checkbox" onclick="updateBypasssAuthSettings();" />
<label for="bypass_auth_subnet_whitelist_checkbox">QBT_TR(Bypass authentication for clients in whitelisted IP subnets)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow" style="padding-left: 30px; padding-top: 5px;">
<textarea id="bypass_auth_subnet_whitelist_textarea" rows="5" cols="48" placeholder="Example: 172.17.32.0/24, fdff:ffff:c8::/40"></textarea>
</div>
</fieldset>
<fieldset class="settings">
<legend><input type="checkbox" id="use_alt_webui_checkbox" onclick="updateAlternativeWebUISettings();" />
<label for="use_alt_webui_checkbox">QBT_TR(Use alternative Web UI)QBT_TR[CONTEXT=OptionsDialog]</label></legend>
<div class="formRow">
<label for="webui_files_location_textarea">QBT_TR(Files location:)QBT_TR[CONTEXT=OptionsDialog]</label>
<input type="text" id="webui_files_location_textarea" />
</div>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Security)QBT_TR[CONTEXT=OptionsDialog]</legend>
<div class="formRow">
<input type="checkbox" id="clickjacking_protection_checkbox" />
<label for="clickjacking_protection_checkbox">QBT_TR(Enable clickjacking protection)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow">
<input type="checkbox" id="csrf_protection_checkbox" />
<label for="csrf_protection_checkbox">QBT_TR(Enable Cross-Site Request Forgery (CSRF) protection)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<fieldset class="settings">
<legend>
<input type="checkbox" id="host_header_validation_checkbox" onclick="updateHostHeaderValidationSettings();" />
<label for="host_header_validation_checkbox">QBT_TR(Enable Host header validation)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<table>
<tr>
<td>
<label for="webui_domain_textarea">QBT_TR(Server domains:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<textarea id="webui_domain_textarea" rows="1" cols="60"></textarea>
</td>
</tr>
</table>
</fieldset>
</fieldset>
</fieldset>
<fieldset class="settings">
<legend>
<input type="checkbox" id="use_dyndns_checkbox" onclick="updateDynDnsSettings();" />
<label for="use_dyndns_checkbox">QBT_TR(Update my dynamic domain name)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<select id="dyndns_select">
<option value="0">DynDNS</option>
<option value="1">NO-IP</option>
</select>
<input type="button" value="QBT_TR(Register)QBT_TR[CONTEXT=OptionsDialog]" onclick="registerDynDns();" />
<table style="margin-top: 10px;">
<tr>
<td>
<label for="dyndns_domain_text">QBT_TR(Domain name:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="dyndns_domain_text" />
</td>
</tr>
<tr>
<td>
<label for="dyndns_username_text">QBT_TR(Username:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="dyndns_username_text" />
</td>
</tr>
<tr>
<td>
<label for="dyndns_password_text">QBT_TR(Password:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="password" id="dyndns_password_text" />
</td>
</tr>
</table>
</fieldset>
</div>
<div style="text-align: center; margin-top: 1em;"><input type="button" value="QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" onclick="applyPreferences();" /></div>
<script>
// Downloads tab
var WatchedFoldersTable = new HtmlTable($("watched_folders_tab"));
updateTempDirEnabled = function() {
var isTempDirEnabled = $('temppath_checkbox').getProperty('checked');
$('temppath_text').setProperty('disabled', !isTempDirEnabled);
};
addWatchFolder = function() {
var new_folder = $('new_watch_folder_txt').getProperty('value').trim();
if (new_folder.length <= 0) return;
var new_other = $('new_watch_folder_other_txt').getProperty('value').trim();
if (new_other.length <= 0) return;
var new_select = $('new_watch_folder_select').getProperty('value').trim();
var i = $('watched_folders_tab').getChildren('tbody')[0].getChildren('tr').length;
pushWatchFolder(i, new_folder, new_select, new_other);
// Clear fields
$('new_watch_folder_txt').setProperty('value', '');
var elt = $('new_watch_folder_select');
elt.setProperty('value', 'watch_folder');
var text = elt.options[elt.selectedIndex].innerHTML;
$('new_watch_folder_other_txt').setProperty('value', text);
};
changeWatchFolderSelect = function(item) {
if (item.value == "other") {
item.nextElementSibling.hidden = false;
item.nextElementSibling.value = 'QBT_TR(Type folder here)QBT_TR[CONTEXT=HttpServer]';
item.nextElementSibling.select();
}
else {
item.nextElementSibling.hidden = true;
var text = item.options[item.selectedIndex].innerHTML;
item.nextElementSibling.value = text;
}
};
pushWatchFolder = function(pos, folder, sel, other) {
var myinput = "<input id='text_watch_" + pos + "' type='text' value='" + folder + "'>";
var disableInput = (sel != "other");
var mycb = "<div class='select-watched-folder-editable'>"
+ "<select id ='cb_watch_" + pos + "' onchange='changeWatchFolderSelect(this)'>"
+ "<option value='watch_folder'>QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
+ "<option value='default_folder'>QBT_TR(Default save location)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
+ "<option value='other'>QBT_TR(Other...)QBT_TR[CONTEXT=HttpServer]</option>"
+ "</select>"
+ "<input id='cb_watch_txt_" + pos + "' type='text' " + (disableInput ? "hidden " : "") + "/></div>";
WatchedFoldersTable.push([myinput, mycb]);
$('cb_watch_' + pos).setProperty('value', sel);
if (disableInput) {
var elt = $('cb_watch_' + pos);
other = elt.options[elt.selectedIndex].innerHTML;
}
$('cb_watch_txt_' + pos).setProperty('value', other);
};
getWatchedFolders = function() {
var nb_folders = $("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length;
var folders = new Hash();
for (var i = 0; i < nb_folders; ++i) {
var fpath = $('text_watch_' + i).getProperty('value').trim();
if (fpath.length > 0) {
var other;
var sel = $('cb_watch_' + i).getProperty('value').trim();
if (sel == "other") {
other = $('cb_watch_txt_' + i).getProperty('value').trim();
}
else {
other = (sel == "watch_folder") ? 0 : 1;
}
folders.set(fpath, other);
}
}
return folders;
};
updateExportDirEnabled = function() {
var isExportDirEnabled = $('exportdir_checkbox').getProperty('checked');
$('exportdir_text').setProperty('disabled', !isExportDirEnabled);
};
updateExportDirFinEnabled = function() {
var isExportDirFinEnabled = $('exportdirfin_checkbox').getProperty('checked');
$('exportdirfin_text').setProperty('disabled', !isExportDirFinEnabled);
};
updateMailNotification = function() {
var isMailNotificationEnabled = $('mail_notification_checkbox').getProperty('checked');
$('src_email_txt').setProperty('disabled', !isMailNotificationEnabled);
$('dest_email_txt').setProperty('disabled', !isMailNotificationEnabled);
$('smtp_server_txt').setProperty('disabled', !isMailNotificationEnabled);
$('mail_ssl_checkbox').setProperty('disabled', !isMailNotificationEnabled);
$('mail_auth_checkbox').setProperty('disabled', !isMailNotificationEnabled);
if (!isMailNotificationEnabled) {
$('mail_auth_checkbox').setProperty('checked', !isMailNotificationEnabled);
updateMailAuthSettings();
}
};
updateMailAuthSettings = function() {
var isMailAuthEnabled = $('mail_auth_checkbox').getProperty('checked');
$('mail_username_text').setProperty('disabled', !isMailAuthEnabled);
$('mail_password_text').setProperty('disabled', !isMailAuthEnabled);
};
updateAutoRun = function() {
var isAutoRunEnabled = $('autorun_checkbox').getProperty('checked');
$('autorunProg_txt').setProperty('disabled', !isAutoRunEnabled);
};
// Connection tab
updateMaxConnecEnabled = function() {
var isMaxConnecEnabled = $('max_connec_checkbox').getProperty('checked');
$('max_connec_value').setProperty('disabled', !isMaxConnecEnabled);
};
updateMaxConnecPerTorrentEnabled = function() {
var isMaxConnecPerTorrentEnabled = $('max_connec_per_torrent_checkbox').getProperty('checked');
$('max_connec_per_torrent_value').setProperty('disabled', !isMaxConnecPerTorrentEnabled);
};
updateMaxUploadsEnabled = function() {
var isMaxUploadsEnabled = $('max_uploads_checkbox').getProperty('checked');
$('max_uploads_value').setProperty('disabled', !isMaxUploadsEnabled);
};
updateMaxUploadsPerTorrentEnabled = function() {
var isMaxUploadsPerTorrentEnabled = $('max_uploads_per_torrent_checkbox').getProperty('checked');
$('max_uploads_per_torrent_value').setProperty('disabled', !isMaxUploadsPerTorrentEnabled);
};
updatePeerProxySettings = function() {
var isPeerProxyTypeSelected = $('peer_proxy_type_select').getProperty('value') != "none";
$('peer_proxy_host_text').setProperty('disabled', !isPeerProxyTypeSelected);
$('peer_proxy_port_value').setProperty('disabled', !isPeerProxyTypeSelected);
$('use_peer_proxy_checkbox').setProperty('disabled', !isPeerProxyTypeSelected);
$('force_proxy_checkbox').setProperty('disabled', !isPeerProxyTypeSelected);
$('proxy_only_for_torrents_checkbox').setProperty('disabled', !isPeerProxyTypeSelected);
if (isPeerProxyTypeSelected) {
var isPeerProxyTypeSocks5 = $('peer_proxy_type_select').getProperty('value') == "socks5";
$('peer_proxy_auth_checkbox').setProperty('disabled', !isPeerProxyTypeSocks5);
if (!isPeerProxyTypeSocks5) {
$('peer_proxy_auth_checkbox').setProperty('checked', isPeerProxyTypeSocks5);
updatePeerProxyAuthSettings();
}
}
else {
$('peer_proxy_auth_checkbox').setProperty('disabled', !isPeerProxyTypeSelected);
$('peer_proxy_auth_checkbox').setProperty('checked', isPeerProxyTypeSelected);
updatePeerProxyAuthSettings();
}
updateForceProxySettings();