diff --git a/common/modules/util.js b/common/modules/util.js index 8857420..3ed3394 100644 --- a/common/modules/util.js +++ b/common/modules/util.js @@ -128,8 +128,10 @@ export const defaults = { playerDeband: false, rssQuality: '1080', rssFeedsNew: SUPPORTS.extensions ? [['New Releases', 'SubsPlease']] : [], - rssAutoplay: true, - torrentSpeed: 5, + torrentSpeed: 5, // legacy + downloadSpeed: 5, + uploadSpeed: 1, + slowSeeding: true, torrentPersist: false, torrentDHT: false, torrentPeX: false, diff --git a/common/modules/webtorrent.js b/common/modules/webtorrent.js index 45d4d07..3065c1a 100644 --- a/common/modules/webtorrent.js +++ b/common/modules/webtorrent.js @@ -47,8 +47,8 @@ export default class TorrentClient extends WebTorrent { super({ dht: !settings.torrentDHT, maxConns: settings.maxConns, - downloadLimit: settings.torrentSpeed * 1048576 || 0, - uploadLimit: settings.torrentSpeed * 1572864 || 0, // :trolled: + downloadLimit: settings.downloadSpeed * 1048576 || 0, + uploadLimit: (settings.slowSeeding ? 1048576 : (settings.uploadSpeed * 1048576)) || 0, torrentPort: settings.torrentPort || 0, dhtPort: settings.dhtPort || 0, natUpnp: SUPPORTS.permamentNAT ? 'permanent' : true diff --git a/common/views/Settings/TorrentSettings.svelte b/common/views/Settings/TorrentSettings.svelte index 4992dc0..19a3b18 100644 --- a/common/views/Settings/TorrentSettings.svelte +++ b/common/views/Settings/TorrentSettings.svelte @@ -172,7 +172,7 @@ MB/s - + --> @@ -198,3 +198,30 @@ + + +

Limited Bandwidth Settings

+ +
+ + +
+
+ +
+ +
+ MB/s +
+
+
+{#if !settings.slowSeeding} + +
+ +
+ MB/s +
+
+
+ {/if}