mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-23 01:22:27 +00:00
feat: option to seperate DL and UL
This commit is contained in:
parent
472534833a
commit
526b2fc5a2
3 changed files with 34 additions and 5 deletions
|
|
@ -128,8 +128,10 @@ export const defaults = {
|
||||||
playerDeband: false,
|
playerDeband: false,
|
||||||
rssQuality: '1080',
|
rssQuality: '1080',
|
||||||
rssFeedsNew: SUPPORTS.extensions ? [['New Releases', 'SubsPlease']] : [],
|
rssFeedsNew: SUPPORTS.extensions ? [['New Releases', 'SubsPlease']] : [],
|
||||||
rssAutoplay: true,
|
torrentSpeed: 5, // legacy
|
||||||
torrentSpeed: 5,
|
downloadSpeed: 5,
|
||||||
|
uploadSpeed: 1,
|
||||||
|
slowSeeding: true,
|
||||||
torrentPersist: false,
|
torrentPersist: false,
|
||||||
torrentDHT: false,
|
torrentDHT: false,
|
||||||
torrentPeX: false,
|
torrentPeX: false,
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ export default class TorrentClient extends WebTorrent {
|
||||||
super({
|
super({
|
||||||
dht: !settings.torrentDHT,
|
dht: !settings.torrentDHT,
|
||||||
maxConns: settings.maxConns,
|
maxConns: settings.maxConns,
|
||||||
downloadLimit: settings.torrentSpeed * 1048576 || 0,
|
downloadLimit: settings.downloadSpeed * 1048576 || 0,
|
||||||
uploadLimit: settings.torrentSpeed * 1572864 || 0, // :trolled:
|
uploadLimit: (settings.slowSeeding ? 1048576 : (settings.uploadSpeed * 1048576)) || 0,
|
||||||
torrentPort: settings.torrentPort || 0,
|
torrentPort: settings.torrentPort || 0,
|
||||||
dhtPort: settings.dhtPort || 0,
|
dhtPort: settings.dhtPort || 0,
|
||||||
natUpnp: SUPPORTS.permamentNAT ? 'permanent' : true
|
natUpnp: SUPPORTS.permamentNAT ? 'permanent' : true
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@
|
||||||
<span class='input-group-text bg-dark'>MB/s</span>
|
<span class='input-group-text bg-dark'>MB/s</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingCard>
|
</SettingCard> -->
|
||||||
<SettingCard title='Max Number of Connections' description='Number of peers per torrent. Higher values will increase download speeds but might quickly fill up available ports if your ISP limits the maximum allowed number of open connections.'>
|
<SettingCard title='Max Number of Connections' description='Number of peers per torrent. Higher values will increase download speeds but might quickly fill up available ports if your ISP limits the maximum allowed number of open connections.'>
|
||||||
<input type='number' inputmode='numeric' pattern='[0-9]*' bind:value={settings.maxConns} min='1' max='512' class='form-control text-right bg-dark w-100 mw-full' />
|
<input type='number' inputmode='numeric' pattern='[0-9]*' bind:value={settings.maxConns} min='1' max='512' class='form-control text-right bg-dark w-100 mw-full' />
|
||||||
</SettingCard>
|
</SettingCard>
|
||||||
|
|
@ -198,3 +198,30 @@
|
||||||
<label for='torrent-pex'>{settings.torrentPeX ? 'On' : 'Off'}</label>
|
<label for='torrent-pex'>{settings.torrentPeX ? 'On' : 'Off'}</label>
|
||||||
</div>
|
</div>
|
||||||
</SettingCard>
|
</SettingCard>
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class='mb-10 font-weight-bold'>Limited Bandwidth Settings</h4>
|
||||||
|
<SettingCard title='Slow Seeding' description="Will limit upload speed to 1 MB/s. This might kill the swarm health. But very useful when you have a limited bandwidth.">
|
||||||
|
<div class='custom-switch'>
|
||||||
|
<input type='checkbox' id='slow-seeding' bind:checked={settings.slowSeeding} />
|
||||||
|
<label for='slow-seeding'>{settings.slowSeeding ? 'On' : 'Off'}</label>
|
||||||
|
</div>
|
||||||
|
</SettingCard>
|
||||||
|
<SettingCard title='Download Speed Limit' description='Download speed limit for torrents, higher values increase CPU usage, and values higher than your storage write speeds will quickly fill up RAM.'>
|
||||||
|
<div class='input-group w-100 mw-full'>
|
||||||
|
<input type='number' inputmode='numeric' pattern={'[0-9]*.?[0-9]*'} bind:value={settings.downloadSpeed} min='0' max='50' step='0.1' class='form-control text-right bg-dark' />
|
||||||
|
<div class='input-group-append'>
|
||||||
|
<span class='input-group-text bg-dark'>MB/s</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</SettingCard>
|
||||||
|
{#if !settings.slowSeeding}
|
||||||
|
<SettingCard title='Upload Speed Limit' description='Upload speed limit for torrents, setting this to 0 might causes problems.'>
|
||||||
|
<div class='input-group w-100 mw-full'>
|
||||||
|
<input type='number' inputmode='numeric' pattern={'[0-9]*.?[0-9]*'} bind:value={settings.uploadSpeed} min='0' max='50' step='0.1' class='form-control text-right bg-dark' />
|
||||||
|
<div class='input-group-append'>
|
||||||
|
<span class='input-group-text bg-dark'>MB/s</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</SettingCard>
|
||||||
|
{/if}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue