max conn option

This commit is contained in:
ThaUnknown 2020-11-08 12:07:26 +01:00
parent 4278273b07
commit ea850b3f29
4 changed files with 13 additions and 2 deletions

View file

@ -10,6 +10,9 @@
.cover-img {
object-fit: cover;
}
input:invalid{
box-shadow: 0 0 0 0.2rem var(--danger-color) !important
}
::-webkit-inner-spin-button {
opacity: 1;

View file

@ -356,6 +356,14 @@
Erai-raws</option>
</select>
</div>
<div class="input-group w-200 mb-10" data-toggle="tooltip" data-placement="top"
data-title="How Many Max Peers To Connect To, Higher Numbers Mean Higher Speeds And More CPU Usage">
<div class="input-group-prepend">
<span class="input-group-text">Max Connections</span>
</div>
<input id="torrent6" type="number" value="55" min="10" step="5" max="255"
class="form-control text-right">
</div>
<div class="custom-switch mb-10" data-toggle="tooltip" data-placement="top" data-title="Skips The Torrent Selection Popup, Might Lead To Unwanted Videos Being
Played">
<input type="checkbox" id="torrent2">

View file

@ -1,5 +1,5 @@
const settingsElements = [
player1, player2, player3, player4, player5, player6, player7, player8, subtitle1, subtitle2, subtitle3, torrent1, torrent2, torrent3, torrent4, torrent5, other1, other2
player1, player2, player3, player4, player5, player6, player7, player8, subtitle1, subtitle2, subtitle3, torrent1, torrent2, torrent3, torrent4, torrent5, torrent6, other1, other2
]
let settings = {}
function restoreDefaults() {

View file

@ -1,4 +1,4 @@
let client = new WebTorrent()
let client = new WebTorrent({maxConns: settings.torrent6})
window.onbeforeunload = () => {
client.torrents[0] ? client.torrents[0].store.destroy() : ""
client.torrents[0] ? client.torrents[0].destroy() : ""