2022-10-18 22:39:32 -04:00
< div id = "DownloadsTab" class = "PrefTab" >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > When adding a torrent< / legend >
2022-10-18 22:39:32 -04:00
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< label for = "contentlayout_select" > Torrent content layout:< / label >
2022-10-18 22:39:32 -04:00
< select id = "contentlayout_select" >
2022-11-30 13:49:48 -05:00
< option value = "Original" > Original< / option >
< option value = "Subfolder" > Create subfolder< / option >
< option value = "NoSubfolder" > Don't create subfolder< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "dontstartdownloads_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "dontstartdownloads_checkbox" > Do not start the download automatically< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< label for = "stopConditionSelect" > Torrent stop condition:< / label >
2022-10-18 22:39:32 -04:00
< select id = "stopConditionSelect" >
2022-11-30 13:49:48 -05:00
< option value = "None" > None< / option >
< option value = "MetadataReceived" > Metadata received< / option >
< option value = "FilesChecked" > Files checked< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "deletetorrentfileafter_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "deletetorrentfileafter_checkbox" > Delete .torrent files afterwards< / label >
2022-10-18 22:39:32 -04:00
< / div >
< / fieldset >
< div class = "formRow" >
< input type = "checkbox" id = "preallocateall_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "preallocateall_checkbox" > Pre-allocate disk space for all files< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< span id = "appendexttr" >
< input type = "checkbox" id = "appendext_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "appendext_checkbox" > Append .!qB extension to incomplete files< / label >
2022-10-18 22:39:32 -04:00
< / span >
< / div >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Saving Management< / legend >
2022-10-18 22:39:32 -04:00
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label > Default Torrent Management Mode:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "default_tmm_combobox" >
2022-11-30 13:49:48 -05:00
< option value = "false" selected > Manual< / option >
< option value = "true" > Automatic< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label > When Torrent Category changed:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "torrent_changed_tmm_combobox" >
2022-11-30 13:49:48 -05:00
< option value = "true" > Relocate torrent< / option >
< option value = "false" selected > Switch torrent to Manual Mode< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label > When Default Save Path changed:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "save_path_changed_tmm_combobox" >
2022-11-30 13:49:48 -05:00
< option value = "true" > Relocate affected torrents< / option >
< option value = "false" selected > Switch affected torrents to Manual Mode< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label > When Category Save Path changed:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "category_changed_tmm_combobox" >
2022-11-30 13:49:48 -05:00
< option value = "true" > Relocate affected torrents< / option >
< option value = "false" selected > Switch affected torrents to Manual Mode< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< / table >
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "savepath_text" > Default Save Path:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "savepath_text" autocorrect = "off" autocapitalize = "none" / >
< / td >
< / tr >
< tr >
< td >
< input type = "checkbox" id = "temppath_checkbox" onclick = "qBittorrent.Preferences.updateTempDirEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "temppath_checkbox" > Keep incomplete torrents in:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "temppath_text" autocorrect = "off" autocapitalize = "none" / >
< / td >
< / tr >
< tr >
< td >
< input type = "checkbox" id = "exportdir_checkbox" onclick = "qBittorrent.Preferences.updateExportDirEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "exportdir_checkbox" > Copy .torrent files to:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "exportdir_text" autocorrect = "off" autocapitalize = "none" / >
< / td >
< / tr >
< tr >
< td >
< input type = "checkbox" id = "exportdirfin_checkbox" onclick = "qBittorrent.Preferences.updateExportDirFinEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "exportdirfin_checkbox" > Copy .torrent files for finished downloads to:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "exportdirfin_text" autocorrect = "off" autocapitalize = "none" / >
< / td >
< / tr >
< / table >
< / fieldset >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Automatically add torrents from:< / legend >
2022-10-18 22:39:32 -04:00
< table id = "watched_folders_tab" style = "border: 1px solid black;" >
< thead >
< tr >
2022-11-30 13:49:48 -05:00
< th > Monitored Folder< / th >
< th > Override Save Location< / th >
2022-10-18 22:39:32 -04:00
< / tr >
< / thead >
< tbody > < / tbody >
< / table >
< / fieldset >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "excludedFileNamesCheckbox" onclick = "qBittorrent.Preferences.updateExcludedFileNamesEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "excludedFileNamesCheckbox" > Excluded file names< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< textarea id = "excludedFileNamesTextarea" rows = "6" cols = "70" > < / textarea >
< / fieldset >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "mail_notification_checkbox" onclick = "qBittorrent.Preferences.updateMailNotification();" / >
2022-11-30 13:49:48 -05:00
< label for = "mail_notification_checkbox" > Email notification upon download completion< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "src_email_txt" > From:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "src_email_txt" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "dest_email_txt" > To:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "dest_email_txt" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "smtp_server_txt" > SMTP server:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "smtp_server_txt" / >
< / td >
< / tr >
< / table >
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< input type = "checkbox" id = "mail_ssl_checkbox" / > < label for = "mail_ssl_checkbox" > This server requires a secure connection (SSL)< / label >
2022-10-18 22:39:32 -04:00
< / div >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "mail_auth_checkbox" onclick = "qBittorrent.Preferences.updateMailAuthSettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "mail_auth_checkbox" > Authentication< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "mail_username_text" > Username:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "mail_username_text" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "mail_password_text" > Password:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "password" id = "mail_password_text" / >
< / td >
< / tr >
< / table >
< / fieldset >
< / fieldset >
< fieldset class = "settings" >
< legend >
2022-11-30 13:49:48 -05:00
Run external program
2022-10-18 22:39:32 -04:00
< / legend >
< div class = "formRow" >
< input type = "checkbox" id = "autorunOnTorrentAddedCheckbox" onclick = "qBittorrent.Preferences.updateAutoRunOnTorrentAdded();" / >
2022-11-30 13:49:48 -05:00
< label for = "autorunOnTorrentAddedCheckbox" > Run external program on torrent added< / label >
2022-10-18 22:39:32 -04:00
< input type = "text" id = "autorunOnTorrentAddedProgram" style = "width: 400px;" / >
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "autorun_checkbox" onclick = "qBittorrent.Preferences.updateAutoRun();" / >
2022-11-30 13:49:48 -05:00
< label for = "autorun_checkbox" > Run external program on torrent finished< / label >
2022-10-18 22:39:32 -04:00
< input type = "text" id = "autorunProg_txt" style = "width: 400px;" / >
< / div >
2022-11-30 13:49:48 -05:00
< div style = "font-style: italic;" > Supported parameters (case sensitive):
2022-10-18 22:39:32 -04:00
< ul >
2022-11-30 13:49:48 -05:00
< li > %N: Torrent name< / li >
< li > %L: Category< / li >
< li > %G: Tags (separated by comma)< / li >
< li > %F: Content path (same as root path for multifile torrent)< / li >
< li > %R: Root path (first torrent subdirectory path)< / li >
< li > %D: Save path< / li >
< li > %C: Number of files< / li >
< li > %Z: Torrent size (bytes)< / li >
< li > %T: Current tracker< / li >
< li > %I: Info hash v1< / li >
< li > %J: Info hash v2< / li >
< li > %K: Torrent ID< / li >
2022-10-18 22:39:32 -04:00
< / ul >
2022-11-30 13:49:48 -05:00
Tip: Encapsulate parameter with quotation marks to avoid text being cut off at whitespace (e.g., "%N")
2022-10-18 22:39:32 -04:00
< / div >
< / fieldset >
< / div >
< div id = "ConnectionTab" class = "PrefTab invisible" >
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< label > Peer connection protocol:< / label >
2022-10-18 22:39:32 -04:00
< select id = "enable_protocol_combobox" >
2022-11-30 13:49:48 -05:00
< option value = "0" selected > TCP and μTP< / option >
2022-10-18 22:39:32 -04:00
< option value = "1" > TCP< / option >
< option value = "2" > μTP< / option >
< / select >
< / div >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Listening Port< / legend >
2022-10-18 22:39:32 -04:00
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< label for = "port_value" > Port used for incoming connections:< / label >
< input type = "text" id = "port_value" style = "width: 4em;" title = "Set to 0 to let your system pick an unused port" / >
< button style = "margin-left: 1em;" onclick = "qBittorrent.Preferences.generateRandomPort();" > Random< / button >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "upnp_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "upnp_checkbox" > Use UPnP / NAT-PMP port forwarding from my router< / label >
2022-10-18 22:39:32 -04:00
< / div >
< / fieldset >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Connections Limits< / legend >
2022-10-18 22:39:32 -04:00
< table >
< tr >
< td >
< input type = "checkbox" id = "max_connec_checkbox" onclick = "qBittorrent.Preferences.updateMaxConnecEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "max_connec_checkbox" > Global maximum number of connections:< / label >
2022-10-18 22:39:32 -04:00
< / 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 = "qBittorrent.Preferences.updateMaxConnecPerTorrentEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "max_connec_per_torrent_checkbox" > Maximum number of connections per torrent:< / label >
2022-10-18 22:39:32 -04:00
< / 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 = "qBittorrent.Preferences.updateMaxUploadsEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "max_uploads_checkbox" > Global maximum number of upload slots:< / label >
2022-10-18 22:39:32 -04:00
< / 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 = "qBittorrent.Preferences.updateMaxUploadsPerTorrentEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "max_uploads_per_torrent_checkbox" > Maximum number of upload slots per torrent:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td > < input type = "text" id = "max_uploads_per_torrent_value" style = "width: 4em;" / > < / td >
< / tr >
< / table >
< / fieldset >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Proxy Server< / legend >
2022-10-18 22:39:32 -04:00
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "peer_proxy_type_select" > Type:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "peer_proxy_type_select" onchange = "qBittorrent.Preferences.updatePeerProxySettings();" >
2022-11-30 13:49:48 -05:00
< option value = "none" > (None)< / option >
< option value = "socks4" > SOCKS4< / option >
< option value = "socks5" > SOCKS5< / option >
< option value = "http" > HTTP< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< td >
2022-11-30 13:49:48 -05:00
< label for = "peer_proxy_host_text" > Host:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "peer_proxy_host_text" / >
< / td >
< td >
2022-11-30 13:49:48 -05:00
< label for = "peer_proxy_port_value" > Port:< / label >
2022-10-18 22:39:32 -04:00
< / 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" / >
2022-11-30 13:49:48 -05:00
< label for = "use_peer_proxy_checkbox" > Use proxy for peer connections< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "proxy_only_for_torrents_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "proxy_only_for_torrents_checkbox" > Use proxy only for torrents< / label >
2022-10-18 22:39:32 -04:00
< / div >
2022-11-29 09:38:24 -05:00
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< input type = "checkbox" id = "proxyHostnameLookupCheckbox" title = "If checked, hostname lookups are done via the proxy." / >
< label for = "proxyHostnameLookupCheckbox" > Use proxy for hostname lookup< / label >
2022-11-29 09:38:24 -05:00
< / div >
2022-10-18 22:39:32 -04:00
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "peer_proxy_auth_checkbox" onclick = "qBittorrent.Preferences.updatePeerProxyAuthSettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "peer_proxy_auth_checkbox" > Authentication< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "peer_proxy_username_text" > Username:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "peer_proxy_username_text" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "peer_proxy_password_text" > Password:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "password" id = "peer_proxy_password_text" / >
< / td >
< / tr >
< / table >
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< span > Info: The password is saved unencrypted< / span >
2022-10-18 22:39:32 -04:00
< / div >
< / fieldset >
< / fieldset >
< fieldset class = "settings" >
< legend >
2022-11-30 13:49:48 -05:00
< label > IP Filtering< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< div class = "formRow" >
< input type = "checkbox" id = "ipfilter_text_checkbox" onclick = "qBittorrent.Preferences.updateFilterSettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "ipfilter_text_checkbox" > Filter path (.dat, .p2p, .p2b):< / label >
2022-10-18 22:39:32 -04:00
< input type = "text" id = "ipfilter_text" / >
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "ipfilter_trackers_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "ipfilter_trackers_checkbox" > Apply to trackers< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Manually banned IP addresses...< / legend >
2022-10-18 22:39:32 -04:00
< textarea id = "banned_IPs_textarea" rows = "5" cols = "70" > < / textarea >
< / fieldset >
< / div >
< / fieldset >
< / div >
< div id = "SpeedTab" class = "PrefTab invisible" >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Global Rate Limits< / legend >
2022-10-18 22:39:32 -04:00
< table >
< tr >
< td rowspan = "2" >
2022-11-30 13:49:48 -05:00
< img src = "images/slow_off.svg" style = "height: 1.5em;" alt = "Alternative speed limits" >
2022-10-18 22:39:32 -04:00
< / td >
2022-11-30 13:49:48 -05:00
< td > < label for = "up_limit_value" > Upload:< / label > < / td >
< td > < input type = "number" id = "up_limit_value" style = "width: 4em;" min = "0" / > KiB/s< / td >
2022-10-18 22:39:32 -04:00
< / tr >
< tr >
2022-11-30 13:49:48 -05:00
< td > < label for = "dl_limit_value" > Download:< / label > < / td >
< td > < input type = "number" id = "dl_limit_value" style = "width: 4em;" min = "0" / > KiB/s< / td >
2022-10-18 22:39:32 -04:00
< / tr >
< / table >
2022-11-30 13:49:48 -05:00
< i > 0 means unlimited< / i >
2022-10-18 22:39:32 -04:00
< / fieldset >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Alternative Rate Limits< / legend >
2022-10-18 22:39:32 -04:00
< table >
< tr >
< td rowspan = "2" >
2022-11-30 13:49:48 -05:00
< img src = "images/slow.svg" style = "height: 1.5em;" alt = "Alternative speed limits" >
2022-10-18 22:39:32 -04:00
< / td >
2022-11-30 13:49:48 -05:00
< td > < label for = "alt_up_limit_value" > Upload:< / label > < / td >
< td > < input type = "number" id = "alt_up_limit_value" style = "width: 4em;" min = "0" / > KiB/s< / td >
2022-10-18 22:39:32 -04:00
< / tr >
< tr >
2022-11-30 13:49:48 -05:00
< td > < label for = "alt_dl_limit_value" > Download:< / label > < / td >
< td > < input type = "number" id = "alt_dl_limit_value" style = "width: 4em;" min = "0" / > KiB/s< / td >
2022-10-18 22:39:32 -04:00
< / tr >
< / table >
2022-11-30 13:49:48 -05:00
< i > 0 means unlimited< / i >
2022-10-18 22:39:32 -04:00
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "limitSchedulingCheckbox" onclick = "qBittorrent.Preferences.updateSchedulingEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "limitSchedulingCheckbox" > Schedule the use of alternative rate limits< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
From:
2022-10-18 22:39:32 -04:00
< input type = "text" id = "schedule_from_hour" style = "width: 1.5em;" / > :< input type = "text" id = "schedule_from_min" style = "width: 1.5em;" / >
2022-11-30 13:49:48 -05:00
To:
2022-10-18 22:39:32 -04:00
< 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" >
2022-11-30 13:49:48 -05:00
When:
2022-10-18 22:39:32 -04:00
< select id = "schedule_freq_select" >
2022-11-30 13:49:48 -05:00
< option value = "0" > Every day< / option >
< option value = "1" > Weekdays< / option >
< option value = "2" > Weekends< / option >
< option value = "3" > Monday< / option >
< option value = "4" > Tuesday< / option >
< option value = "5" > Wednesday< / option >
< option value = "6" > Thursday< / option >
< option value = "7" > Friday< / option >
< option value = "8" > Saturday< / option >
< option value = "9" > Sunday< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / div >
< / fieldset >
< / fieldset >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Rate Limits Settings< / legend >
2022-10-18 22:39:32 -04:00
< div class = "formRow" >
< input type = "checkbox" id = "limit_utp_rate_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "limit_utp_rate_checkbox" > Apply rate limit to µTP protocol< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "limit_tcp_overhead_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "limit_tcp_overhead_checkbox" > Apply rate limit to transport overhead< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "limit_lan_peers_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "limit_lan_peers_checkbox" > Apply rate limit to peers on LAN< / label >
2022-10-18 22:39:32 -04:00
< / div >
< / fieldset >
< / div >
< div id = "BittorrentTab" class = "PrefTab invisible" >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Privacy< / legend >
2022-10-18 22:39:32 -04:00
< div class = "formRow" >
< input type = "checkbox" id = "dht_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "dht_checkbox" > Enable DHT (decentralized network) to find more peers< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "pex_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "pex_checkbox" > Enable Peer Exchange (PeX) to find more peers< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "lsd_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "lsd_checkbox" > Enable Local Peer Discovery to find more peers< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< label for = "encryption_select" > Encryption mode:< / label >
2022-10-18 22:39:32 -04:00
< select id = "encryption_select" >
2022-11-30 13:49:48 -05:00
< option value = "0" > Allow encryption< / option >
< option value = "1" > Require encryption< / option >
< option value = "2" > Disable encryption< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "anonymous_mode_checkbox" / >
2022-11-30 15:41:50 -05:00
< label for = "anonymous_mode_checkbox" > Enable anonymous mode (< a target = "_blank" href = "https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode" > More information< / a > )< / label >
2022-10-18 22:39:32 -04:00
< / div >
< / fieldset >
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< label for = "maxActiveCheckingTorrents" > Max active checking torrents:< / label >
2022-10-18 22:39:32 -04:00
< input type = "number" id = "maxActiveCheckingTorrents" style = "width: 4em;" min = "-1" / >
< / div >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "queueing_checkbox" onclick = "qBittorrent.Preferences.updateQueueingSystem();" / >
2022-11-30 13:49:48 -05:00
< label for = "queueing_checkbox" > Torrent Queueing< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "max_active_dl_value" > Maximum active downloads:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "max_active_dl_value" style = "width: 4em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "max_active_up_value" > Maximum active uploads:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "max_active_up_value" style = "width: 4em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "max_active_to_value" > Maximum active torrents:< / label >
2022-10-18 22:39:32 -04:00
< / 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 = "qBittorrent.Preferences.updateSlowTorrentsSettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "dont_count_slow_torrents_checkbox" > Do not count slow torrents in these limits< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "dl_rate_threshold" > Download rate threshold:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "dl_rate_threshold" style = "width: 4em;" / > KiB/s
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "ul_rate_threshold" > Upload rate threshold:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "ul_rate_threshold" style = "width: 4em;" / > KiB/s
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "torrent_inactive_timer" > Torrent inactivity timer:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "torrent_inactive_timer" style = "width: 4em;" / > seconds
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< / table >
< / fieldset >
< / fieldset >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Seeding Limits< / legend >
2022-10-18 22:39:32 -04:00
< table >
< tr >
< td >
< input type = "checkbox" id = "max_ratio_checkbox" onclick = "qBittorrent.Preferences.updateMaxRatioTimeEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "max_ratio_checkbox" > When ratio reaches< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "max_ratio_value" style = "width: 4em;" / >
< / td >
< / tr >
< tr >
< td >
< input type = "checkbox" id = "max_seeding_time_checkbox" onclick = "qBittorrent.Preferences.updateMaxRatioTimeEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "max_seeding_time_checkbox" > When seeding time reaches< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "max_seeding_time_value" style = "width: 4em;" / > minutes
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
2022-11-30 13:49:48 -05:00
< td style = "text-align: right;" > < label for = "max_ratio_act" > then< / label > < / td >
2022-10-18 22:39:32 -04:00
< td >
< select id = "max_ratio_act" >
2022-11-30 13:49:48 -05:00
< option value = "0" > Pause torrent< / option >
< option value = "1" > Remove torrent< / option >
< option value = "3" > Remove torrent and its files< / option >
< option value = "2" > Enable super seeding for torrent< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< / table >
< / fieldset >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "add_trackers_checkbox" onclick = "qBittorrent.Preferences.updateAddTrackersEnabled();" / >
2022-11-30 13:49:48 -05:00
< label for = "add_trackers_checkbox" > Automatically add these trackers to new downloads:< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< textarea id = "add_trackers_textarea" rows = "5" cols = "70" > < / textarea >
< / fieldset >
< / div >
< div id = "RSSTab" class = "PrefTab invisible" >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > RSS Reader< / legend >
2022-10-18 22:39:32 -04:00
< div class = "formRow" >
< input type = "checkbox" id = "enable_fetching_rss_feeds_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "enable_fetching_rss_feeds_checkbox" > Enable fetching RSS feeds< / label >
2022-10-18 22:39:32 -04:00
< / div >
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "feed_refresh_interval" > Feeds refresh interval:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "feed_refresh_interval" style = "width: 4em;" / > min
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "maximum_article_number" > Maximum number of articles per feed:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "maximum_article_number" style = "width: 4em;" / >
< / td >
< / tr >
< / table >
< / fieldset >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > RSS Torrent Auto Downloader< / legend >
2022-10-18 22:39:32 -04:00
< div class = "formRow" >
< input type = "checkbox" id = "enable_auto_downloading_rss_torrents_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "enable_auto_downloading_rss_torrents_checkbox" > Enable auto downloading of RSS torrents< / label >
2022-10-18 22:39:32 -04:00
< / div >
2022-11-30 13:49:48 -05:00
< button style = "margin: 0 1em; width: calc(100% - 2.2em)" onclick = "window.qBittorrent.Rss.openRssDownloader();" > Edit auto downloading rules...< / button >
2022-10-18 22:39:32 -04:00
< / fieldset >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > RSS Smart Episode Filter< / legend >
2022-10-18 22:39:32 -04:00
< div class = "formRow" >
< input type = "checkbox" id = "downlock_repack_proper_episodes" / >
2022-11-30 13:49:48 -05:00
< label for = "downlock_repack_proper_episodes" > Download REPACK/PROPER episodes< / label >
2022-10-18 22:39:32 -04:00
< / div >
2022-11-30 13:49:48 -05:00
< label for = "rss_filter_textarea" > Filters:< / label > < br >
2022-10-18 22:39:32 -04:00
< textarea id = "rss_filter_textarea" rows = "6" cols = "70" > < / textarea >
< / fieldset >
< / div >
< div id = "WebUITab" class = "PrefTab invisible" >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Language< / legend >
< label for = "locale_select" > User Interface Language:< / label >
2022-10-18 22:39:32 -04:00
< select id = "locale_select" >
< option value = "ar_AE" > عربي< / option >
< option value = "az@latin" > Azərbaycan dili< / option >
< option value = "be_BY" > Беларуская< / option >
< option value = "bg_BG" > Български< / option >
< option value = "ca_ES" > Català< / option >
< option value = "cs_CZ" > Čeština< / option >
< option value = "da_DK" > Dansk< / option >
< option value = "de_DE" > Deutsch< / option >
< option value = "el_GR" > Ελληνικά< / option >
< 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 = "es_ES" > Español< / option >
< option value = "et" > Eesti, eesti keel< / option >
< option value = "eu_ES" > Euskara< / option >
< option value = "fa" > فارسی< / option >
< option value = "fi_FI" > Suomi< / option >
< option value = "fr_FR" > Français< / option >
< option value = "gl_ES" > Galego< / option >
< option value = "he_IL" > עברית< / option >
< option value = "hi_IN" > हिन्दी, हिंदी< / option >
< option value = "hr_HR" > Hrvatski< / option >
< option value = "hu_HU" > Magyar< / option >
< option value = "hy_AM" > Հայերեն< / option >
< option value = "id" > Bahasa Indonesia< / option >
< option value = "is" > Íslenska< / option >
< option value = "it_IT" > Italiano< / option >
< option value = "ja_JP" > 日本語< / option >
< option value = "ka_GE" > ქართული< / option >
< option value = "ko_KR" > 한국어< / option >
< option value = "ltg" > Latgalīšu volūda< / option >
< option value = "lt_LT" > Lietuvių< / option >
< option value = "lv_LV" > Latviešu valoda< / option >
< option value = "mn_MN" > Монгол хэл< / option >
< option value = "ms_MY" > بهاس ملايو< / option >
< option value = "nb_NO" > Norsk< / option >
< option value = "nl_NL" > Nederlands< / option >
< option value = "oc" > lenga d'òc< / option >
< option value = "pl_PL" > Polski< / option >
< option value = "pt_BR" > Português brasileiro< / option >
< option value = "pt_PT" > Português< / option >
< option value = "ro_RO" > Română< / option >
< option value = "ru_RU" > Русский< / option >
< option value = "sk_SK" > Slovenčina< / option >
< option value = "sl_SI" > Slovenščina< / option >
< option value = "sr_CS" > Српски< / option >
< option value = "sv_SE" > Svenska< / option >
< option value = "th" > ไทย< / option >
< option value = "tr_TR" > Türkçe< / option >
< option value = "uk_UA" > Українська< / option >
< option value = "uz@Latn" > أۇزبېك< / option >
< option value = "vi_VN" > Tiếng Việt< / option >
< option value = "zh" > 简体中文< / option >
< option value = "zh_HK" > 香港正體字< / option >
< option value = "zh_TW" > 正體中文< / option >
< / select >
< / fieldset >
< div class = "formRow" >
< input type = "checkbox" id = "performanceWarning" / >
2022-11-30 13:49:48 -05:00
< label for = "performanceWarning" > Log performance warnings< / label >
2022-10-18 22:39:32 -04:00
< / div >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Web User Interface (Remote control)< / legend >
2022-10-18 22:39:32 -04:00
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "webui_address_value" > IP address:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "webui_address_value" / >
2022-11-30 13:49:48 -05:00
< label for = "webui_port_value" style = "margin-left: 10px;" > Port:< / label >
2022-10-18 22:39:32 -04:00
< input type = "text" id = "webui_port_value" style = "width: 4em;" / >
< / td >
< / tr >
< / table >
< div class = "formRow" >
< input type = "checkbox" id = "webui_upnp_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "webui_upnp_checkbox" > Use UPnP / NAT-PMP to forward the port from my router< / label >
2022-10-18 22:39:32 -04:00
< / div >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "use_https_checkbox" onclick = "qBittorrent.Preferences.updateHttpsSettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "use_https_checkbox" > Use HTTPS instead of HTTP< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "ssl_cert_text" > Certificate:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "ssl_cert_text" style = "width: 30em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "ssl_key_text" > Key:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "ssl_key_text" style = "width: 30em;" / >
< / td >
< / tr >
< / table >
2022-11-30 13:49:48 -05:00
< div style = "padding-left: 10px;" > < a target = "_blank" href = "https://httpd.apache.org/docs/current/ssl/ssl_faq.html#aboutcerts" > Information about certificates< / a > < / div >
2022-10-18 22:39:32 -04:00
< / fieldset >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Authentication< / legend >
2022-10-18 22:39:32 -04:00
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "webui_username_text" > Username:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "webui_username_text" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "webui_password_text" > Password:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "password" id = "webui_password_text" placeholder = "Change current password" autocomplete = "new-password" / >
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< / table >
< div class = "formRow" >
< input type = "checkbox" id = "bypass_local_auth_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "bypass_local_auth_checkbox" > Bypass authentication for clients on localhost< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "bypass_auth_subnet_whitelist_checkbox" onclick = "qBittorrent.Preferences.updateBypasssAuthSettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "bypass_auth_subnet_whitelist_checkbox" > Bypass authentication for clients in whitelisted IP subnets< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" style = "padding-left: 30px; padding-top: 5px;" >
2022-11-30 13:49:48 -05:00
< textarea id = "bypass_auth_subnet_whitelist_textarea" rows = "5" cols = "48" placeholder = "Example: 172.17.32.0/24, fdff:ffff:c8::/40" > < / textarea >
2022-10-18 22:39:32 -04:00
< / div >
< table >
< tr >
2022-11-30 13:49:48 -05:00
< td > < label for = "webUIMaxAuthFailCountInput" > Ban client after consecutive failures:< / label > < / td >
2022-10-18 22:39:32 -04:00
< td > < input type = "number" id = "webUIMaxAuthFailCountInput" style = "width: 4em;" min = "0" / > < / td >
< / tr >
< tr >
2022-11-30 13:49:48 -05:00
< td style = "text-align: right;" > < label for = "webUIBanDurationInput" > ban for:< / label > < / td >
< td > < input type = "number" id = "webUIBanDurationInput" style = "width: 4em;" min = "1" / > seconds< / td >
2022-10-18 22:39:32 -04:00
< / tr >
< / table >
< table >
< tr >
2022-11-30 13:49:48 -05:00
< td > < label for = "webUISessionTimeoutInput" > Session timeout:< / label > < / td >
< td > < input type = "number" id = "webUISessionTimeoutInput" style = "width: 4em;" min = "0" / > seconds< / td >
2022-10-18 22:39:32 -04:00
< / tr >
< / table >
< / fieldset >
< fieldset class = "settings" >
< legend > < input type = "checkbox" id = "use_alt_webui_checkbox" onclick = "qBittorrent.Preferences.updateAlternativeWebUISettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "use_alt_webui_checkbox" > Use alternative Web UI< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< label for = "webui_files_location_textarea" > Files location:< / label >
2022-10-18 22:39:32 -04:00
< input type = "text" id = "webui_files_location_textarea" / >
< / div >
< / fieldset >
< fieldset class = "settings" >
2022-11-30 13:49:48 -05:00
< legend > Security< / legend >
2022-10-18 22:39:32 -04:00
< div class = "formRow" >
< input type = "checkbox" id = "clickjacking_protection_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "clickjacking_protection_checkbox" > Enable clickjacking protection< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "csrf_protection_checkbox" / >
2022-11-30 13:49:48 -05:00
< label for = "csrf_protection_checkbox" > Enable Cross-Site Request Forgery (CSRF) protection< / label >
2022-10-18 22:39:32 -04:00
< / div >
< div class = "formRow" >
< input type = "checkbox" id = "secureCookieCheckbox" / >
2022-11-30 13:49:48 -05:00
< label for = "secureCookieCheckbox" > Enable cookie Secure flag (requires HTTPS)< / label >
2022-10-18 22:39:32 -04:00
< / div >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "host_header_validation_checkbox" onclick = "qBittorrent.Preferences.updateHostHeaderValidationSettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "host_header_validation_checkbox" > Enable Host header validation< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "webui_domain_textarea" > Server domains:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 15:41:50 -05:00
< textarea id = "webui_domain_textarea" rows = "1" cols = "60" title = "Whitelist for filtering HTTP Host header values .
2022-10-18 22:39:32 -04:00
In order to defend against DNS rebinding attack,
you should put in domain names used by WebUI server.
2022-11-30 15:05:46 -05:00
Use ';' to split multiple entries. Can use wildcard '*'.">< / textarea >
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< / table >
< / fieldset >
< / fieldset >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "webUIUseCustomHTTPHeadersCheckbox" onclick = "qBittorrent.Preferences.updateWebUICustomHTTPHeadersSettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "webUIUseCustomHTTPHeadersCheckbox" > Add custom HTTP headers< / label >
2022-10-18 22:39:32 -04:00
< / legend >
2022-11-30 13:49:48 -05:00
< textarea id = "webUICustomHTTPHeadersTextarea" placeholder = "Header: value pairs, one per line" style = "width: 90%;" > < / textarea >
2022-10-18 22:39:32 -04:00
< / fieldset >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "webUIReverseProxySupportCheckbox" onclick = "qBittorrent.Preferences.updateWebUIReverseProxySettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "webUIReverseProxySupportCheckbox" > Enable reverse proxy support< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< div class = "formRow" >
2022-11-30 13:49:48 -05:00
< label for = "webUIReverseProxiesListTextarea" > Trusted proxies list:< / label >
< input type = "text" id = "webUIReverseProxiesListTextarea" title = "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." / >
2022-10-18 22:39:32 -04:00
< / div >
< / fieldset >
< / fieldset >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "use_dyndns_checkbox" onclick = "qBittorrent.Preferences.updateDynDnsSettings();" / >
2022-11-30 13:49:48 -05:00
< label for = "use_dyndns_checkbox" > Update my dynamic domain name< / label >
2022-10-18 22:39:32 -04:00
< / legend >
< select id = "dyndns_select" >
< option value = "0" > DynDNS< / option >
< option value = "1" > NO-IP< / option >
< / select >
2022-11-30 13:49:48 -05:00
< input type = "button" value = "Register" onclick = "qBittorrent.Preferences.registerDynDns();" / >
2022-10-18 22:39:32 -04:00
< table style = "margin-top: 10px;" >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "dyndns_domain_text" > Domain name:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "dyndns_domain_text" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "dyndns_username_text" > Username:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "dyndns_username_text" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "dyndns_password_text" > Password:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "password" id = "dyndns_password_text" / >
< / td >
< / tr >
< / table >
< / fieldset >
< / div >
< div id = "AdvancedTab" class = "PrefTab invisible" >
< fieldset class = "settings" >
2022-11-30 15:41:50 -05:00
< legend > qBittorrent Section (< a href = "https://github.com/qbittorrent/qBittorrent/wiki/Explanation-of-Options-in-qBittorrent#Advanced" target = "_blank" > Open documentation< / a > )< / legend >
2022-10-18 22:39:32 -04:00
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "memoryWorkingSetLimit" > Physical memory (RAM) usage limit (applied if libtorrent >= 2.0): < a href = "https://wikipedia.org/wiki/Working_set" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 15:41:50 -05:00
< input type = "text" id = "memoryWorkingSetLimit" style = "width: 15em;" title = "This option is less effective on Linux" > MiB
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "networkInterface" > Network interface:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "networkInterface" style = "width: 15em;" >
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "optionalIPAddressToBind" > Optional IP address to bind to:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "optionalIPAddressToBind" style = "width: 15em;" >
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "saveResumeDataInterval" > Save resume data interval:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "saveResumeDataInterval" style = "width: 15em;" > min
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "recheckTorrentsOnCompletion" > Recheck torrents on completion:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "recheckTorrentsOnCompletion" >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "refreshInterval" > Refresh interval:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 15:41:50 -05:00
< input type = "text" id = "refreshInterval" style = "width: 15em;" title = "It controls the internal state update interval which in turn will affect UI updates" > ms
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "resolvePeerCountries" > Resolve peer countries:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "resolvePeerCountries" >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "reannounceWhenAddressChanged" > Reannounce to all trackers when IP or port changed:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "reannounceWhenAddressChanged" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "enableEmbeddedTracker" > Enable embedded tracker:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "enableEmbeddedTracker" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "embeddedTrackerPort" > Embedded tracker port:< / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "embeddedTrackerPort" style = "width: 15em;" / >
< / td >
< / tr >
2022-11-29 09:38:24 -05:00
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "embeddedTrackerPortForwarding" > Enable port forwarding for embedded tracker:< / label >
2022-11-29 09:38:24 -05:00
< / td >
< td >
< input type = "checkbox" id = "embeddedTrackerPortForwarding" / >
< / td >
< / tr >
2022-10-18 22:39:32 -04:00
< / table >
< / fieldset >
< fieldset class = "settings" >
2022-11-30 15:41:50 -05:00
< legend > libtorrent Section (< a href = "https://www.libtorrent.org/reference-Settings.html" target = "_blank" > Open documentation< / a > )< / legend >
2022-10-18 22:39:32 -04:00
< table >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "asyncIOThreads" > Asynchronous I/O threads: < a href = "https://www.libtorrent.org/reference-Settings.html#aio_threads" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "asyncIOThreads" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "hashingThreads" > Hashing threads (requires libtorrent >= 2.0): < a href = "https://www.libtorrent.org/reference-Settings.html#hashing_threads" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "hashingThreads" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "filePoolSize" > File pool size: < a href = "https://www.libtorrent.org/reference-Settings.html#file_pool_size" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "filePoolSize" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "outstandMemoryWhenCheckingTorrents" > Outstanding memory when checking torrents: < a href = "https://www.libtorrent.org/reference-Settings.html#checking_mem_usage" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "outstandMemoryWhenCheckingTorrents" style = "width: 15em;" / > MiB
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "diskCache" > Disk cache (requires libtorrent < 2.0 ) : & nbsp ; < a href = "https://www.libtorrent.org/reference-Settings.html#cache_size" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "diskCache" style = "width: 15em;" / > MiB
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "diskCacheExpiryInterval" > Disk cache expiry interval (requires libtorrent < 2.0 ) : & nbsp ; < a href = "https://www.libtorrent.org/reference-Settings.html#cache_expiry" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "diskCacheExpiryInterval" style = "width: 15em;" > s
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "diskQueueSize" > Disk queue size: < a href = "https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "diskQueueSize" style = "width: 15em;" > KiB
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "diskIOType" > Disk IO type (libtorrent >= 2.0; requires restart): < a href = "https://www.libtorrent.org/single-page-ref.html#default-disk-io-constructor" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "diskIOType" style = "width: 15em;" >
2022-11-30 13:49:48 -05:00
< option value = "0" > Default< / option >
< option value = "1" > Memory mapped files< / option >
< option value = "2" > POSIX-compliant< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "diskIOReadMode" > Disk IO read mode: < a href = "https://www.libtorrent.org/reference-Settings.html#disk_io_read_mode" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "diskIOReadMode" style = "width: 15em;" >
2022-11-30 13:49:48 -05:00
< option value = "0" > Disable OS cache< / option >
< option value = "1" > Enable OS cache< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "diskIOWriteMode" > Disk IO write mode: < a href = "https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "diskIOWriteMode" style = "width: 15em;" >
2022-11-30 13:49:48 -05:00
< option value = "0" > Disable OS cache< / option >
< option value = "1" > Enable OS cache< / option >
< option value = "2" > Write-through (requires libtorrent >= 2.0.6)< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "coalesceReadsAndWrites" > Coalesce reads & writes (requires libtorrent < 2.0 ) : & nbsp ; < a href = "https://www.libtorrent.org/reference-Settings.html#coalesce_reads" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "coalesceReadsAndWrites" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "pieceExtentAffinity" > Use piece extent affinity: < a href = "https://libtorrent.org/single-page-ref.html#piece_extent_affinity" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "pieceExtentAffinity" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "sendUploadPieceSuggestions" > Send upload piece suggestions: < a href = "https://www.libtorrent.org/reference-Settings.html#suggest_mode" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "sendUploadPieceSuggestions" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "sendBufferWatermark" > Send buffer watermark: < a href = "https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "sendBufferWatermark" style = "width: 15em;" / > KiB
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "sendBufferLowWatermark" > Send buffer low watermark: < a href = "https://www.libtorrent.org/reference-Settings.html#send_buffer_low_watermark" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
2022-11-30 13:49:48 -05:00
< input type = "text" id = "sendBufferLowWatermark" style = "width: 15em;" / > KiB
2022-10-18 22:39:32 -04:00
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "sendBufferWatermarkFactor" > Send buffer watermark factor: < a href = "https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark_factor" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "sendBufferWatermarkFactor" style = "width: 15em;" / > %
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "connectionSpeed" > Outgoing connections per second: < a href = "https://www.libtorrent.org/reference-Settings.html#connection_speed" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "connectionSpeed" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "socketBacklogSize" > Socket backlog size: < a href = "https://www.libtorrent.org/reference-Settings.html#listen_queue_size" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "socketBacklogSize" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "outgoingPortsMin" > Outgoing ports (Min) [0: Disabled]: < a href = "https://www.libtorrent.org/reference-Settings.html#outgoing_port" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "outgoingPortsMin" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "outgoingPortsMax" > Outgoing ports (Max) [0: Disabled]: < a href = "https://www.libtorrent.org/reference-Settings.html#outgoing_port" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "outgoingPortsMax" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "UPnPLeaseDuration" > UPnP lease duration [0: Permanent lease]: < a href = "https://www.libtorrent.org/reference-Settings.html#upnp_lease_duration" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "UPnPLeaseDuration" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "peerToS" > Type of service (ToS) for connections to peers < a href = "https://www.libtorrent.org/reference-Settings.html#peer_tos" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "peerToS" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "utpTCPMixedModeAlgorithm" > μTP-TCP mixed mode algorithm: < a href = "https://www.libtorrent.org/reference-Settings.html#mixed_mode_algorithm" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "utpTCPMixedModeAlgorithm" style = "width: 15em;" >
2022-11-30 13:49:48 -05:00
< option value = "0" > Prefer TCP< / option >
< option value = "1" > Peer proportional (throttles TCP)< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "IDNSupportCheckbox" > Support internationalized domain name (IDN): < a href = "https://www.libtorrent.org/reference-Settings.html#allow_idna" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "IDNSupportCheckbox" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "allowMultipleConnectionsFromTheSameIPAddress" > Allow multiple connections from the same IP address: < a href = "https://www.libtorrent.org/reference-Settings.html#allow_multiple_connections_per_ip" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "allowMultipleConnectionsFromTheSameIPAddress" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "validateHTTPSTrackerCertificate" > Validate HTTPS tracker certificate: < a href = "https://www.libtorrent.org/reference-Settings.html#validate_https_trackers" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "validateHTTPSTrackerCertificate" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "mitigateSSRF" > Server-side request forgery (SSRF) mitigation: < a href = "https://www.libtorrent.org/reference-Settings.html#ssrf_mitigation" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "mitigateSSRF" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "blockPeersOnPrivilegedPorts" > Disallow connection to peers on privileged ports: < a href = "https://libtorrent.org/single-page-ref.html#no_connect_privileged_ports" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "blockPeersOnPrivilegedPorts" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "uploadSlotsBehavior" > Upload slots behavior: < a href = "https://www.libtorrent.org/reference-Settings.html#choking_algorithm" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "uploadSlotsBehavior" style = "width: 15em;" >
2022-11-30 13:49:48 -05:00
< option value = "0" > Fixed slots< / option >
< option value = "1" > Upload rate based< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "uploadChokingAlgorithm" > Upload choking algorithm: < a href = "https://www.libtorrent.org/reference-Settings.html#seed_choking_algorithm" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< select id = "uploadChokingAlgorithm" style = "width: 15em;" >
2022-11-30 13:49:48 -05:00
< option value = "0" > Round-robin< / option >
< option value = "1" > Fastest upload< / option >
< option value = "2" > Anti-leech< / option >
2022-10-18 22:39:32 -04:00
< / select >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "announceAllTrackers" > Always announce to all trackers in a tier: < a href = "https://www.libtorrent.org/reference-Settings.html#announce_to_all_trackers" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "announceAllTrackers" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "announceAllTiers" > Always announce to all tiers: < a href = "https://www.libtorrent.org/reference-Settings.html#announce_to_all_tiers" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "checkbox" id = "announceAllTiers" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "announceIP" > IP address reported to trackers (requires restart): < a href = "https://www.libtorrent.org/reference-Settings.html#announce_ip" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "announceIP" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "maxConcurrentHTTPAnnounces" > Max concurrent HTTP announces: < a href = "https://www.libtorrent.org/reference-Settings.html#max_concurrent_http_announces" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "maxConcurrentHTTPAnnounces" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "stopTrackerTimeout" > Stop tracker timeout: < a href = "https://www.libtorrent.org/reference-Settings.html#stop_tracker_timeout" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "stopTrackerTimeout" style = "width: 15em;" / >
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "peerTurnover" > Peer turnover disconnect percentage: < a href = "https://www.libtorrent.org/reference-Settings.html#peer_turnover" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "peerTurnover" style = "width: 15em;" / > %
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "peerTurnoverCutoff" > Peer turnover threshold percentage: < a href = "https://www.libtorrent.org/reference-Settings.html#peer_turnover" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "peerTurnoverCutoff" style = "width: 15em;" / > %
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "peerTurnoverInterval" > Peer turnover disconnect interval: < a href = "https://www.libtorrent.org/reference-Settings.html#peer_turnover" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "peerTurnoverInterval" style = "width: 15em;" / > s
< / td >
< / tr >
< tr >
< td >
2022-11-30 13:49:48 -05:00
< label for = "requestQueueSize" > Maximum outstanding requests to a single peer: < a href = "https://www.libtorrent.org/reference-Settings.html#max_out_request_queue" target = "_blank" > (?)< / a > < / label >
2022-10-18 22:39:32 -04:00
< / td >
< td >
< input type = "text" id = "requestQueueSize" style = "width: 15em;" / >
< / td >
< / tr >
< / table >
< / fieldset >
< / div >
2022-11-30 13:49:48 -05:00
< div style = "text-align: center; margin-top: 1em;" > < input type = "button" value = "Save" onclick = "qBittorrent.Preferences.applyPreferences();" / > < / div >
2022-10-18 22:39:32 -04:00
< script >
'use strict';
if (window.qBittorrent === undefined) {
window.qBittorrent = {};
}
window.qBittorrent.Preferences = (function() {
const exports = function() {
return {
updateTempDirEnabled: updateTempDirEnabled,
updateExportDirEnabled: updateExportDirEnabled,
updateExportDirFinEnabled: updateExportDirFinEnabled,
addWatchFolder: addWatchFolder,
updateExcludedFileNamesEnabled: updateExcludedFileNamesEnabled,
changeWatchFolderSelect: changeWatchFolderSelect,
updateMailNotification: updateMailNotification,
updateMailAuthSettings: updateMailAuthSettings,
updateAutoRun: updateAutoRun,
updateAutoRunOnTorrentAdded: updateAutoRunOnTorrentAdded,
generateRandomPort: generateRandomPort,
updateMaxConnecEnabled: updateMaxConnecEnabled,
updateMaxConnecPerTorrentEnabled: updateMaxConnecPerTorrentEnabled,
updateMaxUploadsEnabled: updateMaxUploadsEnabled,
updateMaxUploadsPerTorrentEnabled: updateMaxUploadsPerTorrentEnabled,
updatePeerProxySettings: updatePeerProxySettings,
updatePeerProxyAuthSettings: updatePeerProxyAuthSettings,
updateFilterSettings: updateFilterSettings,
updateSchedulingEnabled: updateSchedulingEnabled,
updateQueueingSystem: updateQueueingSystem,
updateSlowTorrentsSettings: updateSlowTorrentsSettings,
updateMaxRatioTimeEnabled: updateMaxRatioTimeEnabled,
updateAddTrackersEnabled: updateAddTrackersEnabled,
updateHttpsSettings: updateHttpsSettings,
updateBypasssAuthSettings: updateBypasssAuthSettings,
updateAlternativeWebUISettings: updateAlternativeWebUISettings,
updateHostHeaderValidationSettings: updateHostHeaderValidationSettings,
updateWebUICustomHTTPHeadersSettings: updateWebUICustomHTTPHeadersSettings,
updateWebUIReverseProxySettings: updateWebUIReverseProxySettings,
updateDynDnsSettings: updateDynDnsSettings,
registerDynDns: registerDynDns,
applyPreferences: applyPreferences
};
};
// Downloads tab
const watchedFoldersTable = new HtmlTable($("watched_folders_tab"));
const updateTempDirEnabled = function() {
const isTempDirEnabled = $('temppath_checkbox').getProperty('checked');
$('temppath_text').setProperty('disabled', !isTempDirEnabled);
};
const changeWatchFolderSelect = (item) => {
if (item.value === "other") {
item.nextElementSibling.hidden = false;
2022-11-30 13:49:48 -05:00
item.nextElementSibling.value = 'Type folder here';
2022-10-18 22:39:32 -04:00
item.nextElementSibling.select();
}
else {
item.nextElementSibling.hidden = true;
const text = item.options[item.selectedIndex].textContent;
item.nextElementSibling.value = text;
}
};
const addWatchFolder = (folder = "", sel = "default_folder", other = "") => {
const pos = $('watched_folders_tab').getChildren('tbody')[0].getChildren('tr').length;
const myinput = "< input id = 'text_watch_" + pos + "' type = 'text' value = '" + folder + "' > ";
const disableInput = (sel !== "other");
const mycb = "< div class = 'select-watched-folder-editable' > "
+ "< select id = 'cb_watch_" + pos + "' onchange = 'qBittorrent.Preferences.changeWatchFolderSelect(this)' > "
2022-11-30 13:49:48 -05:00
+ "< option value = 'watch_folder' > Monitored folder< / option > "
+ "< option value = 'default_folder' > Default save location< / option > "
+ "< option value = 'other' > Other...< / option > "
2022-10-18 22:39:32 -04:00
+ "< / select > "
+ "< input id = 'cb_watch_txt_" + pos + "' type = 'text' " + ( disableInput ? " hidden " : " " ) + " / > "
+ "< img src = 'images/list-add.svg' id = 'addFolderImg_" + pos + "' alt = 'Add' style = 'padding-left:170px;width:16px;cursor:pointer;' onclick = 'qBittorrent.Preferences.addWatchFolder();' / > "
+ "< / div > ";
watchedFoldersTable.push([myinput, mycb]);
$('cb_watch_' + pos).setProperty('value', sel);
if (disableInput) {
const elt = $('cb_watch_' + pos);
other = elt.options[elt.selectedIndex].textContent;
}
$('cb_watch_txt_' + pos).setProperty('value', other);
// hide previous img
if (pos > 0)
$('addFolderImg_' + (pos - 1)).style.display = "none";
};
const getWatchedFolders = () => {
const nb_folders = $("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length;
const folders = new Hash();
for (let i = 0; i < nb_folders ; + + i ) {
const fpath = $('text_watch_' + i).getProperty('value').trim();
if (fpath.length > 0) {
const sel = $('cb_watch_' + i).getProperty('value').trim();
let other;
if (sel === "other")
other = $('cb_watch_txt_' + i).getProperty('value').trim();
else
other = (sel === "watch_folder") ? 0 : 1;
folders.set(fpath, other);
}
}
return folders;
};
const updateExcludedFileNamesEnabled = function() {
const isAExcludedFileNamesEnabled = $('excludedFileNamesCheckbox').getProperty('checked');
$('excludedFileNamesTextarea').setProperty('disabled', !isAExcludedFileNamesEnabled);
};
const updateExportDirEnabled = function() {
const isExportDirEnabled = $('exportdir_checkbox').getProperty('checked');
$('exportdir_text').setProperty('disabled', !isExportDirEnabled);
};
const updateExportDirFinEnabled = function() {
const isExportDirFinEnabled = $('exportdirfin_checkbox').getProperty('checked');
$('exportdirfin_text').setProperty('disabled', !isExportDirFinEnabled);
};
const updateMailNotification = function() {
const 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();
}
};
const updateMailAuthSettings = function() {
const isMailAuthEnabled = $('mail_auth_checkbox').getProperty('checked');
$('mail_username_text').setProperty('disabled', !isMailAuthEnabled);
$('mail_password_text').setProperty('disabled', !isMailAuthEnabled);
};
const updateAutoRunOnTorrentAdded = function() {
const isAutoRunOnTorrentAddedEnabled = $('autorunOnTorrentAddedCheckbox').getProperty('checked');
$('autorunOnTorrentAddedProgram').setProperty('disabled', !isAutoRunOnTorrentAddedEnabled);
};
const updateAutoRun = function() {
const isAutoRunEnabled = $('autorun_checkbox').getProperty('checked');
$('autorunProg_txt').setProperty('disabled', !isAutoRunEnabled);
};
// Connection tab
const updateMaxConnecEnabled = function() {
const isMaxConnecEnabled = $('max_connec_checkbox').getProperty('checked');
$('max_connec_value').setProperty('disabled', !isMaxConnecEnabled);
};
const updateMaxConnecPerTorrentEnabled = function() {
const isMaxConnecPerTorrentEnabled = $('max_connec_per_torrent_checkbox').getProperty('checked');
$('max_connec_per_torrent_value').setProperty('disabled', !isMaxConnecPerTorrentEnabled);
};
const updateMaxUploadsEnabled = function() {
const isMaxUploadsEnabled = $('max_uploads_checkbox').getProperty('checked');
$('max_uploads_value').setProperty('disabled', !isMaxUploadsEnabled);
};
const updateMaxUploadsPerTorrentEnabled = function() {
const isMaxUploadsPerTorrentEnabled = $('max_uploads_per_torrent_checkbox').getProperty('checked');
$('max_uploads_per_torrent_value').setProperty('disabled', !isMaxUploadsPerTorrentEnabled);
};
const updatePeerProxySettings = function() {
const 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);
2022-11-29 09:38:24 -05:00
const proxyType = $('peer_proxy_type_select').getProperty('value');
const isPeerProxyAuthenticatable = (proxyType === "socks5") || (proxyType === "http");
2022-10-18 22:39:32 -04:00
$('proxy_only_for_torrents_checkbox').setProperty('disabled', !isPeerProxyAuthenticatable);
if ($('peer_proxy_type_select').getProperty('value') === "socks4")
$('proxy_only_for_torrents_checkbox').setProperty('checked', true);
2022-11-29 09:38:24 -05:00
const canPeerProxyResolveHostnames = (proxyType === "socks5") || (proxyType === "http");
$('proxyHostnameLookupCheckbox').setProperty('disabled', !canPeerProxyResolveHostnames);
2022-10-18 22:39:32 -04:00
$('peer_proxy_auth_checkbox').setProperty('disabled', !isPeerProxyAuthenticatable);
updatePeerProxyAuthSettings();
};
const updatePeerProxyAuthSettings = function() {
const isPeerProxyAuthEnabled = (!$('peer_proxy_auth_checkbox').getProperty('disabled') & & $('peer_proxy_auth_checkbox').getProperty('checked'));
$('peer_proxy_username_text').setProperty('disabled', !isPeerProxyAuthEnabled);
$('peer_proxy_password_text').setProperty('disabled', !isPeerProxyAuthEnabled);
};
const updateFilterSettings = function() {
const isIPFilterEnabled = $('ipfilter_text_checkbox').getProperty('checked');
$('ipfilter_text').setProperty('disabled', !isIPFilterEnabled);
};
// Speed tab
const updateSchedulingEnabled = function() {
const isLimitSchedulingEnabled = $('limitSchedulingCheckbox').getProperty('checked');
$('schedule_from_hour').setProperty('disabled', !isLimitSchedulingEnabled);
$('schedule_from_min').setProperty('disabled', !isLimitSchedulingEnabled);
$('schedule_to_hour').setProperty('disabled', !isLimitSchedulingEnabled);
$('schedule_to_min').setProperty('disabled', !isLimitSchedulingEnabled);
$('schedule_freq_select').setProperty('disabled', !isLimitSchedulingEnabled);
};
// Bittorrent tab
const updateQueueingSystem = function() {
const isQueueingEnabled = $('queueing_checkbox').getProperty('checked');
$('max_active_dl_value').setProperty('disabled', !isQueueingEnabled);
$('max_active_up_value').setProperty('disabled', !isQueueingEnabled);
$('max_active_to_value').setProperty('disabled', !isQueueingEnabled);
$('dont_count_slow_torrents_checkbox').setProperty('disabled', !isQueueingEnabled);
updateSlowTorrentsSettings();
};
const updateSlowTorrentsSettings = function() {
const isDontCountSlowTorrentsEnabled = (!$('dont_count_slow_torrents_checkbox').getProperty('disabled')) & & $('dont_count_slow_torrents_checkbox').getProperty('checked');
$('dl_rate_threshold').setProperty('disabled', !isDontCountSlowTorrentsEnabled);
$('ul_rate_threshold').setProperty('disabled', !isDontCountSlowTorrentsEnabled);
$('torrent_inactive_timer').setProperty('disabled', !isDontCountSlowTorrentsEnabled);
};
const updateMaxRatioTimeEnabled = function() {
const isMaxRatioEnabled = $('max_ratio_checkbox').getProperty('checked');
$('max_ratio_value').setProperty('disabled', !isMaxRatioEnabled);
const isMaxSeedingTimeEnabled = $('max_seeding_time_checkbox').getProperty('checked');
$('max_seeding_time_value').setProperty('disabled', !isMaxSeedingTimeEnabled);
$('max_ratio_act').setProperty('disabled', !(isMaxRatioEnabled || isMaxSeedingTimeEnabled));
};
const updateAddTrackersEnabled = function() {
const isAddTrackersEnabled = $('add_trackers_checkbox').getProperty('checked');
$('add_trackers_textarea').setProperty('disabled', !isAddTrackersEnabled);
};
// Web UI tab
const updateHttpsSettings = function() {
const isUseHttpsEnabled = $('use_https_checkbox').getProperty('checked');
$('ssl_cert_text').setProperty('disabled', !isUseHttpsEnabled);
$('ssl_key_text').setProperty('disabled', !isUseHttpsEnabled);
$('secureCookieCheckbox').setProperty('disabled', !isUseHttpsEnabled);
};
const updateBypasssAuthSettings = function() {
const isBypassAuthSubnetWhitelistEnabled = $('bypass_auth_subnet_whitelist_checkbox').getProperty('checked');
$('bypass_auth_subnet_whitelist_textarea').setProperty('disabled', !isBypassAuthSubnetWhitelistEnabled);
};
const updateAlternativeWebUISettings = function() {
const isUseAlternativeWebUIEnabled = $('use_alt_webui_checkbox').getProperty('checked');
$('webui_files_location_textarea').setProperty('disabled', !isUseAlternativeWebUIEnabled);
};
const updateHostHeaderValidationSettings = function() {
const isHostHeaderValidationEnabled = $('host_header_validation_checkbox').getProperty('checked');
$('webui_domain_textarea').setProperty('disabled', !isHostHeaderValidationEnabled);
};
const updateWebUICustomHTTPHeadersSettings = function() {
const isEnabled = $('webUIUseCustomHTTPHeadersCheckbox').getProperty('checked');
$('webUICustomHTTPHeadersTextarea').setProperty('disabled', !isEnabled);
};
const updateWebUIReverseProxySettings = function() {
const isEnabled = $('webUIReverseProxySupportCheckbox').getProperty('checked');
$('webUIReverseProxiesListTextarea').setProperty('disabled', !isEnabled);
};
const updateDynDnsSettings = function() {
const isDynDnsEnabled = $('use_dyndns_checkbox').getProperty('checked');
$('dyndns_select').setProperty('disabled', !isDynDnsEnabled);
$('dyndns_domain_text').setProperty('disabled', !isDynDnsEnabled);
$('dyndns_username_text').setProperty('disabled', !isDynDnsEnabled);
$('dyndns_password_text').setProperty('disabled', !isDynDnsEnabled);
};
const registerDynDns = function() {
if ($('dyndns_select').getProperty('value').toInt() == 1) {
window.open("http://www.no-ip.com/services/managed_dns/free_dynamic_dns.html", "NO-IP Registration");
}
else {
window.open("https://www.dyndns.com/account/services/hosts/add.html", "DynDNS Registration");
}
};
const generateRandomPort = function() {
const min = 1024;
const max = 65535;
const port = Math.floor(Math.random() * (max - min + 1) + min);
$('port_value').setProperty('value', port);
};
const time_padding = function(val) {
let ret = val.toString();
if (ret.length == 1)
ret = '0' + ret;
return ret;
};
// Advanced Tab
const updateNetworkInterfaces = function(default_iface) {
const url = 'api/v2/app/networkInterfaceList';
$('networkInterface').empty();
new Request.JSON({
url: url,
method: 'get',
noCache: true,
onFailure: function() {
alert("Could not contact qBittorrent");
},
onSuccess: function(ifaces) {
if (!ifaces)
return;
2022-11-30 13:49:48 -05:00
$('networkInterface').options.add(new Option('Any interface', ''));
2022-10-18 22:39:32 -04:00
ifaces.forEach(function(item, index) {
$('networkInterface').options.add(new Option(item.name, item.value));
});
$('networkInterface').setProperty('value', default_iface);
}
}).send();
};
const updateInterfaceAddresses = function(iface, default_addr) {
const url = 'api/v2/app/networkInterfaceAddressList';
$('optionalIPAddressToBind').empty();
new Request.JSON({
url: url,
method: 'get',
noCache: true,
data: {
'iface': iface
},
onFailure: function() {
alert("Could not contact qBittorrent");
},
onSuccess: function(addresses) {
if (!addresses)
return;
2022-11-30 13:49:48 -05:00
$('optionalIPAddressToBind').options.add(new Option('All addresses', ''));
$('optionalIPAddressToBind').options.add(new Option('All IPv4 addresses', '0.0.0.0'));
$('optionalIPAddressToBind').options.add(new Option('All IPv6 addresses', '::'));
2022-10-18 22:39:32 -04:00
addresses.forEach(function(item, index) {
$('optionalIPAddressToBind').options.add(new Option(item, item));
});
$('optionalIPAddressToBind').setProperty('value', default_addr);
}
}).send();
};
const loadPreferences = function() {
const url = 'api/v2/app/preferences';
new Request.JSON({
url: url,
method: 'get',
noCache: true,
onFailure: function() {
alert("Could not contact qBittorrent");
},
onSuccess: function(pref) {
if (pref) {
// Downloads tab
// When adding a torrent
let index = 0;
switch (pref.torrent_content_layout) {
case "Original":
index = 0;
break;
case "Subfolder":
index = 1;
break;
case "NoSubfolder":
index = 2;
break;
}
$('contentlayout_select').getChildren('option')[index].setAttribute('selected', '');
$('dontstartdownloads_checkbox').setProperty('checked', pref.start_paused_enabled);
switch (pref.torrent_stop_condition) {
case "None":
index = 0;
break;
case "MetadataReceived":
index = 1;
break;
case "FilesChecked":
index = 2;
break;
}
$('stopConditionSelect').getChildren('option')[index].setAttribute('selected', '');
$('deletetorrentfileafter_checkbox').setProperty('checked', pref.auto_delete_mode);
$('preallocateall_checkbox').setProperty('checked', pref.preallocate_all);
$('appendext_checkbox').setProperty('checked', pref.incomplete_files_ext);
// Saving Management
$('default_tmm_combobox').setProperty('value', pref.auto_tmm_enabled);
$('torrent_changed_tmm_combobox').setProperty('value', pref.torrent_changed_tmm_enabled);
$('save_path_changed_tmm_combobox').setProperty('value', pref.save_path_changed_tmm_enabled);
$('category_changed_tmm_combobox').setProperty('value', pref.category_changed_tmm_enabled);
$('savepath_text').setProperty('value', pref.save_path);
$('temppath_checkbox').setProperty('checked', pref.temp_path_enabled);
$('temppath_text').setProperty('value', pref.temp_path);
updateTempDirEnabled();
if (pref.export_dir != '') {
$('exportdir_checkbox').setProperty('checked', true);
$('exportdir_text').setProperty('value', pref.export_dir);
}
else {
$('exportdir_checkbox').setProperty('checked', false);
$('exportdir_text').setProperty('value', '');
}
updateExportDirEnabled();
if (pref.export_dir_fin != '') {
$('exportdirfin_checkbox').setProperty('checked', true);
$('exportdirfin_text').setProperty('value', pref.export_dir_fin);
}
else {
$('exportdirfin_checkbox').setProperty('checked', false);
$('exportdirfin_text').setProperty('value', '');
}
updateExportDirFinEnabled();
// Automatically add torrents from
for (const [folder, folderType] of Object.entries(pref.scan_dirs)) {
let sel = "";
let other = "";
if (typeof folderType === "number") {
sel = (folderType === 0) ? "watch_folder" : "default_folder";
}
else {
sel = "other";
other = folderType;
}
addWatchFolder(folder, sel, other);
}
addWatchFolder();
// Excluded file names
$('excludedFileNamesCheckbox').setProperty('checked', pref.excluded_file_names_enabled);
$('excludedFileNamesTextarea').setProperty('value', pref.excluded_file_names);
// Email notification upon download completion
$('mail_notification_checkbox').setProperty('checked', pref.mail_notification_enabled);
$('src_email_txt').setProperty('value', pref.mail_notification_sender);
$('dest_email_txt').setProperty('value', pref.mail_notification_email);
$('smtp_server_txt').setProperty('value', pref.mail_notification_smtp);
$('mail_ssl_checkbox').setProperty('checked', pref.mail_notification_ssl_enabled);
$('mail_auth_checkbox').setProperty('checked', pref.mail_notification_auth_enabled);
$('mail_username_text').setProperty('value', pref.mail_notification_username);
$('mail_password_text').setProperty('value', pref.mail_notification_password);
updateMailNotification();
updateMailAuthSettings();
// Run an external program on torrent added
$('autorunOnTorrentAddedCheckbox').setProperty('checked', pref.autorun_on_torrent_added_enabled);
$('autorunOnTorrentAddedProgram').setProperty('value', pref.autorun_on_torrent_added_program);
updateAutoRunOnTorrentAdded();
// Run an external program on torrent finished
$('autorun_checkbox').setProperty('checked', pref.autorun_enabled);
$('autorunProg_txt').setProperty('value', pref.autorun_program);
updateAutoRun();
// Connection tab
// Listening Port
$('port_value').setProperty('value', pref.listen_port.toInt());
$('upnp_checkbox').setProperty('checked', pref.upnp);
// Connections Limits
const max_connec = pref.max_connec.toInt();
if (max_connec < = 0) {
$('max_connec_checkbox').setProperty('checked', false);
$('max_connec_value').setProperty('value', 500);
}
else {
$('max_connec_checkbox').setProperty('checked', true);
$('max_connec_value').setProperty('value', max_connec);
}
updateMaxConnecEnabled();
const max_connec_per_torrent = pref.max_connec_per_torrent.toInt();
if (max_connec_per_torrent < = 0) {
$('max_connec_per_torrent_checkbox').setProperty('checked', false);
$('max_connec_per_torrent_value').setProperty('value', 100);
}
else {
$('max_connec_per_torrent_checkbox').setProperty('checked', true);
$('max_connec_per_torrent_value').setProperty('value', max_connec_per_torrent);
}
updateMaxConnecPerTorrentEnabled();
const max_uploads = pref.max_uploads.toInt();
if (max_uploads < = 0) {
$('max_uploads_checkbox').setProperty('checked', false);
$('max_uploads_value').setProperty('value', 8);
}
else {
$('max_uploads_checkbox').setProperty('checked', true);
$('max_uploads_value').setProperty('value', max_uploads);
}
updateMaxUploadsEnabled();
const max_uploads_per_torrent = pref.max_uploads_per_torrent.toInt();
if (max_uploads_per_torrent < = 0) {
$('max_uploads_per_torrent_checkbox').setProperty('checked', false);
$('max_uploads_per_torrent_value').setProperty('value', 4);
}
else {
$('max_uploads_per_torrent_checkbox').setProperty('checked', true);
$('max_uploads_per_torrent_value').setProperty('value', max_uploads_per_torrent);
}
updateMaxUploadsPerTorrentEnabled();
// Proxy Server
switch (pref.proxy_type.toInt()) {
case 5: //SOCKS4
$('peer_proxy_type_select').setProperty('value', 'socks4');
break;
case 2: // SOCKS5
case 4: // SOCKS5_PW
$('peer_proxy_type_select').setProperty('value', 'socks5');
break;
case 1: // HTTP
case 3: // HTTP_PW
$('peer_proxy_type_select').setProperty('value', 'http');
break;
default: // NONE
$('peer_proxy_type_select').setProperty('value', 'none');
}
updatePeerProxySettings();
$('peer_proxy_host_text').setProperty('value', pref.proxy_ip);
$('peer_proxy_port_value').setProperty('value', pref.proxy_port);
$('use_peer_proxy_checkbox').setProperty('checked', pref.proxy_peer_connections);
$('proxy_only_for_torrents_checkbox').setProperty('checked', pref.proxy_torrents_only);
2022-11-29 09:38:24 -05:00
$('proxyHostnameLookupCheckbox').setProperty('checked', pref.proxy_hostname_lookup);
2022-10-18 22:39:32 -04:00
$('peer_proxy_auth_checkbox').setProperty('checked', pref.proxy_auth_enabled);
updatePeerProxyAuthSettings();
$('peer_proxy_username_text').setProperty('value', pref.proxy_username);
$('peer_proxy_password_text').setProperty('value', pref.proxy_password);
// IP Filtering
$('ipfilter_text_checkbox').setProperty('checked', pref.ip_filter_enabled);
$('ipfilter_text').setProperty('value', pref.ip_filter_path);
$('ipfilter_trackers_checkbox').setProperty('checked', pref.ip_filter_trackers);
$('banned_IPs_textarea').setProperty('value', pref.banned_IPs);
updateFilterSettings();
// Speed tab
// Global Rate Limits
$('up_limit_value').setProperty('value', (pref.up_limit.toInt() / 1024));
$('dl_limit_value').setProperty('value', (pref.dl_limit.toInt() / 1024));
// Alternative Global Rate Limits
$('alt_up_limit_value').setProperty('value', (pref.alt_up_limit.toInt() / 1024));
$('alt_dl_limit_value').setProperty('value', (pref.alt_dl_limit.toInt() / 1024));
$('enable_protocol_combobox').setProperty('value', pref.bittorrent_protocol);
$('limit_utp_rate_checkbox').setProperty('checked', pref.limit_utp_rate);
$('limit_tcp_overhead_checkbox').setProperty('checked', pref.limit_tcp_overhead);
$('limit_lan_peers_checkbox').setProperty('checked', pref.limit_lan_peers);
// Scheduling
$('limitSchedulingCheckbox').setProperty('checked', pref.scheduler_enabled);
$('schedule_from_hour').setProperty('value', time_padding(pref.schedule_from_hour));
$('schedule_from_min').setProperty('value', time_padding(pref.schedule_from_min));
$('schedule_to_hour').setProperty('value', time_padding(pref.schedule_to_hour));
$('schedule_to_min').setProperty('value', time_padding(pref.schedule_to_min));
$('schedule_freq_select').setProperty('value', pref.scheduler_days);
updateSchedulingEnabled();
// Bittorrent tab
// Privacy
$('dht_checkbox').setProperty('checked', pref.dht);
$('pex_checkbox').setProperty('checked', pref.pex);
$('lsd_checkbox').setProperty('checked', pref.lsd);
const encryption = pref.encryption.toInt();
$('encryption_select').getChildren('option')[encryption].setAttribute('selected', '');
$('anonymous_mode_checkbox').setProperty('checked', pref.anonymous_mode);
$('maxActiveCheckingTorrents').setProperty('value', pref.max_active_checking_torrents);
// Torrent Queueing
$('queueing_checkbox').setProperty('checked', pref.queueing_enabled);
$('max_active_dl_value').setProperty('value', pref.max_active_downloads.toInt());
$('max_active_up_value').setProperty('value', pref.max_active_uploads.toInt());
$('max_active_to_value').setProperty('value', pref.max_active_torrents.toInt());
$('dont_count_slow_torrents_checkbox').setProperty('checked', pref.dont_count_slow_torrents);
$('dl_rate_threshold').setProperty('value', pref.slow_torrent_dl_rate_threshold.toInt());
$('ul_rate_threshold').setProperty('value', pref.slow_torrent_ul_rate_threshold.toInt());
$('torrent_inactive_timer').setProperty('value', pref.slow_torrent_inactive_timer.toInt());
updateQueueingSystem();
// Share Limiting
$('max_ratio_checkbox').setProperty('checked', pref.max_ratio_enabled);
$('max_ratio_value').setProperty('value', (pref.max_ratio_enabled ? pref.max_ratio : 1));
$('max_seeding_time_checkbox').setProperty('checked', pref.max_seeding_time_enabled);
$('max_seeding_time_value').setProperty('value', (pref.max_seeding_time_enabled ? pref.max_seeding_time.toInt() : 1440));
let maxRatioAct = 0;
switch (pref.max_ratio_act.toInt()) {
case 0: // Pause
default:
maxRatioAct = 0;
break;
case 1: // Remove
maxRatioAct = 1;
break;
case 2: // Enable super seeding
maxRatioAct = 3;
break;
case 3: // Remove torrent and files
maxRatioAct = 2;
break;
}
$('max_ratio_act').getChildren('option')[maxRatioAct].setAttribute('selected', '');
updateMaxRatioTimeEnabled();
// Add trackers
$('add_trackers_checkbox').setProperty('checked', pref.add_trackers_enabled);
$('add_trackers_textarea').setProperty('value', pref.add_trackers);
updateAddTrackersEnabled();
// RSS Tab
$('enable_fetching_rss_feeds_checkbox').setProperty('checked', pref.rss_processing_enabled);
$('feed_refresh_interval').setProperty('value', pref.rss_refresh_interval);
$('maximum_article_number').setProperty('value', pref.rss_max_articles_per_feed);
$('enable_auto_downloading_rss_torrents_checkbox').setProperty('checked', pref.rss_auto_downloading_enabled);
$('downlock_repack_proper_episodes').setProperty('checked', pref.rss_download_repack_proper_episodes);
$('rss_filter_textarea').setProperty('value', pref.rss_smart_episode_filters);
// Web UI tab
// Language
$('locale_select').setProperty('value', ((pref.locale === "en_US") ? "en" : pref.locale));
$('performanceWarning').setProperty('checked', pref.performance_warning);
// HTTP Server
$('webui_domain_textarea').setProperty('value', pref.web_ui_domain_list);
$('webui_address_value').setProperty('value', pref.web_ui_address);
$('webui_port_value').setProperty('value', pref.web_ui_port);
$('webui_upnp_checkbox').setProperty('checked', pref.web_ui_upnp);
$('use_https_checkbox').setProperty('checked', pref.use_https);
$('ssl_cert_text').setProperty('value', pref.web_ui_https_cert_path);
$('ssl_key_text').setProperty('value', pref.web_ui_https_key_path);
updateHttpsSettings();
// Authentication
$('webui_username_text').setProperty('value', pref.web_ui_username);
$('bypass_local_auth_checkbox').setProperty('checked', pref.bypass_local_auth);
$('bypass_auth_subnet_whitelist_checkbox').setProperty('checked', pref.bypass_auth_subnet_whitelist_enabled);
$('bypass_auth_subnet_whitelist_textarea').setProperty('value', pref.bypass_auth_subnet_whitelist);
updateBypasssAuthSettings();
$('webUIMaxAuthFailCountInput').setProperty('value', pref.web_ui_max_auth_fail_count.toInt());
$('webUIBanDurationInput').setProperty('value', pref.web_ui_ban_duration.toInt());
$('webUISessionTimeoutInput').setProperty('value', pref.web_ui_session_timeout.toInt());
// Use alternative Web UI
$('use_alt_webui_checkbox').setProperty('checked', pref.alternative_webui_enabled);
$('webui_files_location_textarea').setProperty('value', pref.alternative_webui_path);
updateAlternativeWebUISettings();
// Security
$('clickjacking_protection_checkbox').setProperty('checked', pref.web_ui_clickjacking_protection_enabled);
$('csrf_protection_checkbox').setProperty('checked', pref.web_ui_csrf_protection_enabled);
$('secureCookieCheckbox').setProperty('checked', pref.web_ui_secure_cookie_enabled);
$('host_header_validation_checkbox').setProperty('checked', pref.web_ui_host_header_validation_enabled);
updateHostHeaderValidationSettings();
// Custom HTTP headers
$('webUIUseCustomHTTPHeadersCheckbox').setProperty('checked', pref.web_ui_use_custom_http_headers_enabled);
$('webUICustomHTTPHeadersTextarea').setProperty('value', pref.web_ui_custom_http_headers);
updateWebUICustomHTTPHeadersSettings();
// Reverse Proxy
$('webUIReverseProxySupportCheckbox').setProperty('checked', pref.web_ui_reverse_proxy_enabled);
$('webUIReverseProxiesListTextarea').setProperty('value', pref.web_ui_reverse_proxies_list);
updateWebUIReverseProxySettings();
// Update my dynamic domain name
$('use_dyndns_checkbox').setProperty('checked', pref.dyndns_enabled);
$('dyndns_select').setProperty('value', pref.dyndns_service);
$('dyndns_domain_text').setProperty('value', pref.dyndns_domain);
$('dyndns_username_text').setProperty('value', pref.dyndns_username);
$('dyndns_password_text').setProperty('value', pref.dyndns_password);
updateDynDnsSettings();
// Advanced settings
// qBittorrent section
$('memoryWorkingSetLimit').setProperty('value', pref.memory_working_set_limit);
updateNetworkInterfaces(pref.current_network_interface);
updateInterfaceAddresses(pref.current_network_interface, pref.current_interface_address);
$('saveResumeDataInterval').setProperty('value', pref.save_resume_data_interval);
$('recheckTorrentsOnCompletion').setProperty('checked', pref.recheck_completed_torrents);
$('refreshInterval').setProperty('value', pref.refresh_interval);
$('resolvePeerCountries').setProperty('checked', pref.resolve_peer_countries);
$('reannounceWhenAddressChanged').setProperty('checked', pref.reannounce_when_address_changed);
// libtorrent section
$('asyncIOThreads').setProperty('value', pref.async_io_threads);
$('hashingThreads').setProperty('value', pref.hashing_threads);
$('filePoolSize').setProperty('value', pref.file_pool_size);
$('outstandMemoryWhenCheckingTorrents').setProperty('value', pref.checking_memory_use);
$('diskCache').setProperty('value', pref.disk_cache);
$('diskCacheExpiryInterval').setProperty('value', pref.disk_cache_ttl);
$('diskQueueSize').setProperty('value', (pref.disk_queue_size / 1024));
$('diskIOType').setProperty('value', pref.disk_io_type);
$('diskIOReadMode').setProperty('value', pref.disk_io_read_mode);
$('diskIOWriteMode').setProperty('value', pref.disk_io_write_mode);
$('coalesceReadsAndWrites').setProperty('checked', pref.enable_coalesce_read_write);
$('pieceExtentAffinity').setProperty('checked', pref.enable_piece_extent_affinity);
$('sendUploadPieceSuggestions').setProperty('checked', pref.enable_upload_suggestions);
$('sendBufferWatermark').setProperty('value', pref.send_buffer_watermark);
$('sendBufferLowWatermark').setProperty('value', pref.send_buffer_low_watermark);
$('sendBufferWatermarkFactor').setProperty('value', pref.send_buffer_watermark_factor);
$('connectionSpeed').setProperty('value', pref.connection_speed);
$('socketBacklogSize').setProperty('value', pref.socket_backlog_size);
$('outgoingPortsMin').setProperty('value', pref.outgoing_ports_min);
$('outgoingPortsMax').setProperty('value', pref.outgoing_ports_max);
$('UPnPLeaseDuration').setProperty('value', pref.upnp_lease_duration);
$('peerToS').setProperty('value', pref.peer_tos);
$('utpTCPMixedModeAlgorithm').setProperty('value', pref.utp_tcp_mixed_mode);
$('IDNSupportCheckbox').setProperty('checked', pref.idn_support_enabled);
$('allowMultipleConnectionsFromTheSameIPAddress').setProperty('checked', pref.enable_multi_connections_from_same_ip);
$('validateHTTPSTrackerCertificate').setProperty('checked', pref.validate_https_tracker_certificate);
$('mitigateSSRF').setProperty('checked', pref.ssrf_mitigation);
$('blockPeersOnPrivilegedPorts').setProperty('checked', pref.block_peers_on_privileged_ports);
$('enableEmbeddedTracker').setProperty('checked', pref.enable_embedded_tracker);
$('embeddedTrackerPort').setProperty('value', pref.embedded_tracker_port);
2022-11-29 09:38:24 -05:00
$('embeddedTrackerPortForwarding').setProperty('checked', pref.embedded_tracker_port_forwarding);
2022-10-18 22:39:32 -04:00
$('uploadSlotsBehavior').setProperty('value', pref.upload_slots_behavior);
$('uploadChokingAlgorithm').setProperty('value', pref.upload_choking_algorithm);
$('announceAllTrackers').setProperty('checked', pref.announce_to_all_trackers);
$('announceAllTiers').setProperty('checked', pref.announce_to_all_tiers);
$('announceIP').setProperty('value', pref.announce_ip);
$('maxConcurrentHTTPAnnounces').setProperty('value', pref.max_concurrent_http_announces);
$('stopTrackerTimeout').setProperty('value', pref.stop_tracker_timeout);
$('peerTurnover').setProperty('value', pref.peer_turnover);
$('peerTurnoverCutoff').setProperty('value', pref.peer_turnover_cutoff);
$('peerTurnoverInterval').setProperty('value', pref.peer_turnover_interval);
$('requestQueueSize').setProperty('value', pref.request_queue_size);
}
}
}).send();
};
const applyPreferences = function() {
const settings = new Hash();
// Validate form data
// Downloads tab
// When adding a torrent
settings.set('torrent_content_layout', $('contentlayout_select').getSelected()[0].getProperty('value'));
settings.set('start_paused_enabled', $('dontstartdownloads_checkbox').getProperty('checked'));
settings.set('torrent_stop_condition', $('stopConditionSelect').getSelected()[0].getProperty('value'));
settings.set('auto_delete_mode', $('deletetorrentfileafter_checkbox').getProperty('checked'));
settings.set('preallocate_all', $('preallocateall_checkbox').getProperty('checked'));
settings.set('incomplete_files_ext', $('appendext_checkbox').getProperty('checked'));
// Saving Management
settings.set('auto_tmm_enabled', $('default_tmm_combobox').getProperty('value'));
settings.set('torrent_changed_tmm_enabled', $('torrent_changed_tmm_combobox').getProperty('value'));
settings.set('save_path_changed_tmm_enabled', $('save_path_changed_tmm_combobox').getProperty('value'));
settings.set('category_changed_tmm_enabled', $('category_changed_tmm_combobox').getProperty('value'));
settings.set('save_path', $('savepath_text').getProperty('value'));
settings.set('temp_path_enabled', $('temppath_checkbox').getProperty('checked'));
settings.set('temp_path', $('temppath_text').getProperty('value'));
if ($('exportdir_checkbox').getProperty('checked'))
settings.set('export_dir', $('exportdir_text').getProperty('value'));
else
settings.set('export_dir', '');
if ($('exportdirfin_checkbox').getProperty('checked'))
settings.set('export_dir_fin', $('exportdirfin_text').getProperty('value'));
else
settings.set('export_dir_fin', '');
// Automatically add torrents from
settings.set('scan_dirs', getWatchedFolders());
// Excluded file names
settings.set('excluded_file_names_enabled', $('excludedFileNamesCheckbox').getProperty('checked'));
settings.set('excluded_file_names', $('excludedFileNamesTextarea').getProperty('value'));
// Email notification upon download completion
settings.set('mail_notification_enabled', $('mail_notification_checkbox').getProperty('checked'));
settings.set('mail_notification_sender', $('src_email_txt').getProperty('value'));
settings.set('mail_notification_email', $('dest_email_txt').getProperty('value'));
settings.set('mail_notification_smtp', $('smtp_server_txt').getProperty('value'));
settings.set('mail_notification_ssl_enabled', $('mail_ssl_checkbox').getProperty('checked'));
settings.set('mail_notification_auth_enabled', $('mail_auth_checkbox').getProperty('checked'));
settings.set('mail_notification_username', $('mail_username_text').getProperty('value'));
settings.set('mail_notification_password', $('mail_password_text').getProperty('value'));
// Run an external program on torrent added
settings.set('autorun_on_torrent_added_enabled', $('autorunOnTorrentAddedCheckbox').getProperty('checked'));
settings.set('autorun_on_torrent_added_program', $('autorunOnTorrentAddedProgram').getProperty('value'));
// Run an external program on torrent finished
settings.set('autorun_enabled', $('autorun_checkbox').getProperty('checked'));
settings.set('autorun_program', $('autorunProg_txt').getProperty('value'));
// Connection tab
// Listening Port
const listen_port = $('port_value').getProperty('value').toInt();
if (isNaN(listen_port) || (listen_port < 0 ) | | ( listen_port > 65535)) {
2022-11-30 13:49:48 -05:00
alert("The port used for incoming connections must be between 0 and 65535.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('listen_port', listen_port);
settings.set('upnp', $('upnp_checkbox').getProperty('checked'));
// Connections Limits
let max_connec = -1;
if ($('max_connec_checkbox').getProperty('checked')) {
max_connec = $('max_connec_value').getProperty('value').toInt();
if (isNaN(max_connec) || max_connec < = 0) {
2022-11-30 13:49:48 -05:00
alert("Maximum number of connections limit must be greater than 0 or disabled.");
2022-10-18 22:39:32 -04:00
return;
}
}
settings.set('max_connec', max_connec);
let max_connec_per_torrent = -1;
if ($('max_connec_per_torrent_checkbox').getProperty('checked')) {
max_connec_per_torrent = $('max_connec_per_torrent_value').getProperty('value').toInt();
if (isNaN(max_connec_per_torrent) || max_connec_per_torrent < = 0) {
2022-11-30 13:49:48 -05:00
alert("Maximum number of connections per torrent limit must be greater than 0 or disabled.");
2022-10-18 22:39:32 -04:00
return;
}
}
settings.set('max_connec_per_torrent', max_connec_per_torrent);
let max_uploads = -1;
if ($('max_uploads_checkbox').getProperty('checked')) {
max_uploads = $('max_uploads_value').getProperty('value').toInt();
if (isNaN(max_uploads) || max_uploads < = 0) {
2022-11-30 13:49:48 -05:00
alert("Global number of upload slots limit must be greater than 0 or disabled.");
2022-10-18 22:39:32 -04:00
return;
}
}
settings.set('max_uploads', max_uploads);
let max_uploads_per_torrent = -1;
if ($('max_uploads_per_torrent_checkbox').getProperty('checked')) {
max_uploads_per_torrent = $('max_uploads_per_torrent_value').getProperty('value').toInt();
if (isNaN(max_uploads_per_torrent) || max_uploads_per_torrent < = 0) {
2022-11-30 13:49:48 -05:00
alert("Maximum number of upload slots per torrent limit must be greater than 0 or disabled.");
2022-10-18 22:39:32 -04:00
return;
}
}
settings.set('max_uploads_per_torrent', max_uploads_per_torrent);
// Proxy Server
const proxy_type_str = $('peer_proxy_type_select').getProperty('value');
let proxy_type = 0;
let proxy_auth_enabled = false;
if (proxy_type_str == "socks5") {
if ($('peer_proxy_auth_checkbox').getProperty('checked')) {
proxy_type = 4;
proxy_auth_enabled = true;
}
else {
proxy_type = 2;
}
}
else {
if (proxy_type_str == "socks4") {
proxy_type = 5;
}
else {
if (proxy_type_str == "http") {
if ($('peer_proxy_auth_checkbox').getProperty('checked')) {
proxy_type = 3;
proxy_auth_enabled = true;
}
else {
proxy_type = 1;
}
}
}
}
settings.set('proxy_type', proxy_type);
settings.set('proxy_auth_enabled', proxy_auth_enabled);
settings.set('proxy_ip', $('peer_proxy_host_text').getProperty('value'));
settings.set('proxy_port', $('peer_proxy_port_value').getProperty('value').toInt());
settings.set('proxy_peer_connections', $('use_peer_proxy_checkbox').getProperty('checked'));
settings.set('proxy_torrents_only', $('proxy_only_for_torrents_checkbox').getProperty('checked'));
2022-11-29 09:38:24 -05:00
settings.set('proxy_hostname_lookup', $('proxyHostnameLookupCheckbox').getProperty('checked'));
2022-10-18 22:39:32 -04:00
settings.set('proxy_username', $('peer_proxy_username_text').getProperty('value'));
settings.set('proxy_password', $('peer_proxy_password_text').getProperty('value'));
// IP Filtering
settings.set('ip_filter_enabled', $('ipfilter_text_checkbox').getProperty('checked'));
settings.set('ip_filter_path', $('ipfilter_text').getProperty('value'));
settings.set('ip_filter_trackers', $('ipfilter_trackers_checkbox').getProperty('checked'));
settings.set('banned_IPs', $('banned_IPs_textarea').getProperty('value'));
// Speed tab
// Global Rate Limits
const up_limit = $('up_limit_value').getProperty('value').toInt() * 1024;
if (isNaN(up_limit) || up_limit < 0 ) {
2022-11-30 13:49:48 -05:00
alert("Global upload rate limit must be greater than 0 or disabled.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('up_limit', up_limit);
const dl_limit = $('dl_limit_value').getProperty('value').toInt() * 1024;
if (isNaN(dl_limit) || dl_limit < 0 ) {
2022-11-30 13:49:48 -05:00
alert("Global download rate limit must be greater than 0 or disabled.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('dl_limit', dl_limit);
// Alternative Global Rate Limits
const alt_up_limit = $('alt_up_limit_value').getProperty('value').toInt() * 1024;
if (isNaN(alt_up_limit) || alt_up_limit < 0 ) {
2022-11-30 13:49:48 -05:00
alert("Alternative upload rate limit must be greater than 0 or disabled.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('alt_up_limit', alt_up_limit);
const alt_dl_limit = $('alt_dl_limit_value').getProperty('value').toInt() * 1024;
if (isNaN(alt_dl_limit) || alt_dl_limit < 0 ) {
2022-11-30 13:49:48 -05:00
alert("Alternative download rate limit must be greater than 0 or disabled.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('alt_dl_limit', alt_dl_limit);
settings.set('bittorrent_protocol', $('enable_protocol_combobox').getProperty('value'));
settings.set('limit_utp_rate', $('limit_utp_rate_checkbox').getProperty('checked'));
settings.set('limit_tcp_overhead', $('limit_tcp_overhead_checkbox').getProperty('checked'));
settings.set('limit_lan_peers', $('limit_lan_peers_checkbox').getProperty('checked'));
// Scheduler
const scheduling_enabled = $('limitSchedulingCheckbox').getProperty('checked');
settings.set('scheduler_enabled', scheduling_enabled);
if (scheduling_enabled) {
settings.set('schedule_from_hour', $('schedule_from_hour').getProperty('value').toInt());
settings.set('schedule_from_min', $('schedule_from_min').getProperty('value').toInt());
settings.set('schedule_to_hour', $('schedule_to_hour').getProperty('value').toInt());
settings.set('schedule_to_min', $('schedule_to_min').getProperty('value').toInt());
settings.set('scheduler_days', $('schedule_freq_select').getProperty('value').toInt());
}
// Bittorrent tab
// Privacy
settings.set('dht', $('dht_checkbox').getProperty('checked'));
settings.set('pex', $('pex_checkbox').getProperty('checked'));
settings.set('lsd', $('lsd_checkbox').getProperty('checked'));
settings.set('encryption', $('encryption_select').getSelected()[0].getProperty('value'));
settings.set('anonymous_mode', $('anonymous_mode_checkbox').getProperty('checked'));
settings.set('max_active_checking_torrents', $('maxActiveCheckingTorrents').getProperty('value'));
// Torrent Queueing
settings.set('queueing_enabled', $('queueing_checkbox').getProperty('checked'));
if ($('queueing_checkbox').getProperty('checked')) {
const max_active_downloads = $('max_active_dl_value').getProperty('value').toInt();
if (isNaN(max_active_downloads) || max_active_downloads < -1 ) {
2022-11-30 13:49:48 -05:00
alert("Maximum active downloads must be greater than -1.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('max_active_downloads', max_active_downloads);
const max_active_uploads = $('max_active_up_value').getProperty('value').toInt();
if (isNaN(max_active_uploads) || max_active_uploads < -1 ) {
2022-11-30 13:49:48 -05:00
alert("Maximum active uploads must be greater than -1.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('max_active_uploads', max_active_uploads);
const max_active_torrents = $('max_active_to_value').getProperty('value').toInt();
if (isNaN(max_active_torrents) || max_active_torrents < -1 ) {
2022-11-30 13:49:48 -05:00
alert("Maximum active torrents must be greater than -1.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('max_active_torrents', max_active_torrents);
settings.set('dont_count_slow_torrents', $('dont_count_slow_torrents_checkbox').getProperty('checked'));
const dl_rate_threshold = $('dl_rate_threshold').getProperty('value').toInt();
if (isNaN(dl_rate_threshold) || (dl_rate_threshold < 1 ) ) {
2022-11-30 13:49:48 -05:00
alert("Download rate threshold must be greater than 0.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('slow_torrent_dl_rate_threshold', dl_rate_threshold);
const ul_rate_threshold = $('ul_rate_threshold').getProperty('value').toInt();
if (isNaN(ul_rate_threshold) || (ul_rate_threshold < 1 ) ) {
2022-11-30 13:49:48 -05:00
alert("Upload rate threshold must be greater than 0.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('slow_torrent_ul_rate_threshold', ul_rate_threshold);
const torrent_inactive_timer = $('torrent_inactive_timer').getProperty('value').toInt();
if (isNaN(torrent_inactive_timer) || (torrent_inactive_timer < 1 ) ) {
2022-11-30 13:49:48 -05:00
alert("Torrent inactivity timer must be greater than 0.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('slow_torrent_inactive_timer', torrent_inactive_timer);
}
// Share Ratio Limiting
let max_ratio = -1;
if ($('max_ratio_checkbox').getProperty('checked')) {
max_ratio = $('max_ratio_value').getProperty('value').toFloat();
if (isNaN(max_ratio) || (max_ratio < 0 ) | | ( max_ratio > 9998)) {
2022-11-30 13:49:48 -05:00
alert("Share ratio limit must be between 0 and 9998.");
2022-10-18 22:39:32 -04:00
return;
}
}
settings.set('max_ratio_enabled', $('max_ratio_checkbox').getProperty('checked'));
settings.set('max_ratio', max_ratio);
let max_seeding_time = -1;
if ($('max_seeding_time_checkbox').getProperty('checked')) {
max_seeding_time = $('max_seeding_time_value').getProperty('value').toInt();
if (isNaN(max_seeding_time) || (max_seeding_time < 0 ) | | ( max_seeding_time > 525600)) {
2022-11-30 13:49:48 -05:00
alert("Seeding time limit must be between 0 and 525600 minutes.");
2022-10-18 22:39:32 -04:00
return;
}
}
settings.set('max_seeding_time_enabled', $('max_seeding_time_checkbox').getProperty('checked'));
settings.set('max_seeding_time', max_seeding_time);
settings.set('max_ratio_act', $('max_ratio_act').getProperty('value').toInt());
// Add trackers
settings.set('add_trackers_enabled', $('add_trackers_checkbox').getProperty('checked'));
settings.set('add_trackers', $('add_trackers_textarea').getProperty('value'));
// RSS Tab
settings.set('rss_processing_enabled', $('enable_fetching_rss_feeds_checkbox').getProperty('checked'));
settings.set('rss_refresh_interval', $('feed_refresh_interval').getProperty('value'));
settings.set('rss_max_articles_per_feed', $('maximum_article_number').getProperty('value'));
settings.set('rss_auto_downloading_enabled', $('enable_auto_downloading_rss_torrents_checkbox').getProperty('checked'));
settings.set('rss_download_repack_proper_episodes', $('downlock_repack_proper_episodes').getProperty('checked'));
settings.set('rss_smart_episode_filters', $('rss_filter_textarea').getProperty('value'));
// Web UI tab
// Language
settings.set('locale', $('locale_select').getProperty('value'));
settings.set('performance_warning', $('performanceWarning').getProperty('checked'));
// HTTP Server
settings.set('web_ui_domain_list', $('webui_domain_textarea').getProperty('value'));
const web_ui_address = $('webui_address_value').getProperty('value').toString();
const web_ui_port = $('webui_port_value').getProperty('value').toInt();
if (isNaN(web_ui_port) || web_ui_port < 1 | | web_ui_port > 65535) {
2022-11-30 13:49:48 -05:00
alert("The port used for the Web UI must be between 1 and 65535.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('web_ui_address', web_ui_address);
settings.set('web_ui_port', web_ui_port);
settings.set('web_ui_upnp', $('webui_upnp_checkbox').getProperty('checked'));
const useHTTPS = $('use_https_checkbox').getProperty('checked');
settings.set('use_https', useHTTPS);
const httpsCertificate = $('ssl_cert_text').getProperty('value');
settings.set('web_ui_https_cert_path', httpsCertificate);
if (useHTTPS & & (httpsCertificate.length === 0)) {
2022-11-30 13:49:48 -05:00
alert("HTTPS certificate should not be empty");
2022-10-18 22:39:32 -04:00
return;
}
const httpsKey = $('ssl_key_text').getProperty('value');
settings.set('web_ui_https_key_path', httpsKey);
if (useHTTPS & & (httpsKey.length === 0)) {
2022-11-30 13:49:48 -05:00
alert("HTTPS key should not be empty");
2022-10-18 22:39:32 -04:00
return;
}
// Authentication
const web_ui_username = $('webui_username_text').getProperty('value');
if (web_ui_username.length < 3 ) {
2022-11-30 13:49:48 -05:00
alert("The Web UI username must be at least 3 characters long.");
2022-10-18 22:39:32 -04:00
return;
}
const web_ui_password = $('webui_password_text').getProperty('value');
if ((0 < web_ui_password.length ) & & ( web_ui_password . length < 6 ) ) {
2022-11-30 13:49:48 -05:00
alert("The Web UI password must be at least 6 characters long.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('web_ui_username', web_ui_username);
if (web_ui_password.length > 0)
settings.set('web_ui_password', web_ui_password);
settings.set('bypass_local_auth', $('bypass_local_auth_checkbox').getProperty('checked'));
settings.set('bypass_auth_subnet_whitelist_enabled', $('bypass_auth_subnet_whitelist_checkbox').getProperty('checked'));
settings.set('bypass_auth_subnet_whitelist', $('bypass_auth_subnet_whitelist_textarea').getProperty('value'));
settings.set('web_ui_max_auth_fail_count', $('webUIMaxAuthFailCountInput').getProperty('value'));
settings.set('web_ui_ban_duration', $('webUIBanDurationInput').getProperty('value'));
settings.set('web_ui_session_timeout', $('webUISessionTimeoutInput').getProperty('value'));
// Use alternative Web UI
const alternative_webui_enabled = $('use_alt_webui_checkbox').getProperty('checked');
const webui_files_location_textarea = $('webui_files_location_textarea').getProperty('value');
if (alternative_webui_enabled & & (webui_files_location_textarea.trim() === "")) {
2022-11-30 13:49:48 -05:00
alert("The alternative Web UI files location cannot be blank.");
2022-10-18 22:39:32 -04:00
return;
}
settings.set('alternative_webui_enabled', alternative_webui_enabled);
settings.set('alternative_webui_path', webui_files_location_textarea);
// Security
settings.set('web_ui_clickjacking_protection_enabled', $('clickjacking_protection_checkbox').getProperty('checked'));
settings.set('web_ui_csrf_protection_enabled', $('csrf_protection_checkbox').getProperty('checked'));
settings.set('web_ui_secure_cookie_enabled', $('secureCookieCheckbox').getProperty('checked'));
settings.set('web_ui_host_header_validation_enabled', $('host_header_validation_checkbox').getProperty('checked'));
// Custom HTTP headers
settings.set('web_ui_use_custom_http_headers_enabled', $('webUIUseCustomHTTPHeadersCheckbox').getProperty('checked'));
settings.set('web_ui_custom_http_headers', $('webUICustomHTTPHeadersTextarea').getProperty('value'));
// Reverse Proxy
settings.set('web_ui_reverse_proxy_enabled', $('webUIReverseProxySupportCheckbox').getProperty('checked'));
settings.set('web_ui_reverse_proxies_list', $('webUIReverseProxiesListTextarea').getProperty('value'));
// Update my dynamic domain name
settings.set('dyndns_enabled', $('use_dyndns_checkbox').getProperty('checked'));
settings.set('dyndns_service', $('dyndns_select').getProperty('value'));
settings.set('dyndns_domain', $('dyndns_domain_text').getProperty('value'));
settings.set('dyndns_username', $('dyndns_username_text').getProperty('value'));
settings.set('dyndns_password', $('dyndns_password_text').getProperty('value'));
// Update advanced settings
// qBittorrent section
settings.set('memory_working_set_limit', $('memoryWorkingSetLimit').getProperty('value'));
settings.set('current_network_interface', $('networkInterface').getProperty('value'));
settings.set('current_interface_address', $('optionalIPAddressToBind').getProperty('value'));
settings.set('save_resume_data_interval', $('saveResumeDataInterval').getProperty('value'));
settings.set('recheck_completed_torrents', $('recheckTorrentsOnCompletion').getProperty('checked'));
settings.set('refresh_interval', $('refreshInterval').getProperty('value'));
settings.set('resolve_peer_countries', $('resolvePeerCountries').getProperty('checked'));
settings.set('reannounce_when_address_changed', $('reannounceWhenAddressChanged').getProperty('checked'));
// libtorrent section
settings.set('async_io_threads', $('asyncIOThreads').getProperty('value'));
settings.set('hashing_threads', $('hashingThreads').getProperty('value'));
settings.set('file_pool_size', $('filePoolSize').getProperty('value'));
settings.set('checking_memory_use', $('outstandMemoryWhenCheckingTorrents').getProperty('value'));
settings.set('disk_cache', $('diskCache').getProperty('value'));
settings.set('disk_cache_ttl', $('diskCacheExpiryInterval').getProperty('value'));
settings.set('disk_queue_size', ($('diskQueueSize').getProperty('value') * 1024));
settings.set('disk_io_type', $('diskIOType').getProperty('value'));
settings.set('disk_io_read_mode', $('diskIOReadMode').getProperty('value'));
settings.set('disk_io_write_mode', $('diskIOWriteMode').getProperty('value'));
settings.set('enable_coalesce_read_write', $('coalesceReadsAndWrites').getProperty('checked'));
settings.set('enable_piece_extent_affinity', $('pieceExtentAffinity').getProperty('checked'));
settings.set('enable_upload_suggestions', $('sendUploadPieceSuggestions').getProperty('checked'));
settings.set('send_buffer_watermark', $('sendBufferWatermark').getProperty('value'));
settings.set('send_buffer_low_watermark', $('sendBufferLowWatermark').getProperty('value'));
settings.set('send_buffer_watermark_factor', $('sendBufferWatermarkFactor').getProperty('value'));
settings.set('connection_speed', $('connectionSpeed').getProperty('value'));
settings.set('socket_backlog_size', $('socketBacklogSize').getProperty('value'));
settings.set('outgoing_ports_min', $('outgoingPortsMin').getProperty('value'));
settings.set('outgoing_ports_max', $('outgoingPortsMax').getProperty('value'));
settings.set('upnp_lease_duration', $('UPnPLeaseDuration').getProperty('value'));
settings.set('peer_tos', $('peerToS').getProperty('value'));
settings.set('utp_tcp_mixed_mode', $('utpTCPMixedModeAlgorithm').getProperty('value'));
settings.set('idn_support_enabled', $('IDNSupportCheckbox').getProperty('checked'));
settings.set('enable_multi_connections_from_same_ip', $('allowMultipleConnectionsFromTheSameIPAddress').getProperty('checked'));
settings.set('validate_https_tracker_certificate', $('validateHTTPSTrackerCertificate').getProperty('checked'));
settings.set('ssrf_mitigation', $('mitigateSSRF').getProperty('checked'));
settings.set('block_peers_on_privileged_ports', $('blockPeersOnPrivilegedPorts').getProperty('checked'));
settings.set('enable_embedded_tracker', $('enableEmbeddedTracker').getProperty('checked'));
settings.set('embedded_tracker_port', $('embeddedTrackerPort').getProperty('value'));
2022-11-29 09:38:24 -05:00
settings.set('embedded_tracker_port_forwarding', $('embeddedTrackerPortForwarding').getProperty('checked'));
2022-10-18 22:39:32 -04:00
settings.set('upload_slots_behavior', $('uploadSlotsBehavior').getProperty('value'));
settings.set('upload_choking_algorithm', $('uploadChokingAlgorithm').getProperty('value'));
settings.set('announce_to_all_trackers', $('announceAllTrackers').getProperty('checked'));
settings.set('announce_to_all_tiers', $('announceAllTiers').getProperty('checked'));
settings.set('announce_ip', $('announceIP').getProperty('value'));
settings.set('max_concurrent_http_announces', $('maxConcurrentHTTPAnnounces').getProperty('value'));
settings.set('stop_tracker_timeout', $('stopTrackerTimeout').getProperty('value'));
settings.set('peer_turnover', $('peerTurnover').getProperty('value'));
settings.set('peer_turnover_cutoff', $('peerTurnoverCutoff').getProperty('value'));
settings.set('peer_turnover_interval', $('peerTurnoverInterval').getProperty('value'));
settings.set('request_queue_size', $('requestQueueSize').getProperty('value'));
// Send it to qBT
const json_str = JSON.encode(settings);
new Request({
url: 'api/v2/app/setPreferences',
method: 'post',
data: {
'json': json_str,
},
onFailure: function() {
2022-11-30 13:49:48 -05:00
alert("Unable to save program preferences, qBittorrent is probably unreachable.");
2022-10-18 22:39:32 -04:00
window.parent.closeWindows();
},
onSuccess: function() {
// Close window
window.parent.location.reload();
window.parent.closeWindows();
}
}).send();
};
$('networkInterface').addEvent('change', function() {
updateInterfaceAddresses($(this).getProperty('value'), '');
});
loadPreferences();
return exports();
})();
Object.freeze(window.qBittorrent.Preferences);
< / script >