From f6d9c64bcc2e0e85e2c804b997104cb21323e2b4 Mon Sep 17 00:00:00 2001 From: szbk Date: Wed, 29 Oct 2025 01:24:10 +0300 Subject: [PATCH] =?UTF-8?q?Trasnfers=20ekran=C4=B1na=20total=20download=20?= =?UTF-8?q?speed=20alan=C4=B1=20eklendi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/routes/Transfers.svelte | 71 +++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/client/src/routes/Transfers.svelte b/client/src/routes/Transfers.svelte index 30a989c..aaceefe 100644 --- a/client/src/routes/Transfers.svelte +++ b/client/src/routes/Transfers.svelte @@ -5,6 +5,8 @@ let torrents = []; let ws; let isAllPaused = false; + let totalDownloaded = 0; + let totalDownloadSpeed = 0; // Modal / player state let showModal = false; @@ -31,6 +33,8 @@ torrents = d.torrents || []; // Tüm torrentlerin pause durumunu kontrol et updateAllPausedState(); + // Toplam download miktarını ve hızını güncelle + updateTransferStats(); } }; } @@ -40,6 +44,7 @@ if (!r.ok) return; torrents = await r.json(); updateAllPausedState(); + updateTransferStats(); } async function upload(e) { @@ -121,6 +126,11 @@ isAllPaused = allPaused; } + function updateTransferStats() { + totalDownloaded = torrents.reduce((sum, t) => sum + (t.downloaded || 0), 0); + totalDownloadSpeed = torrents.reduce((sum, t) => sum + (t.downloadSpeed || 0), 0); + } + async function toggleSingleTorrent(hash) { const torrent = torrents.find(t => t.infoHash === hash); if (!torrent) return; @@ -397,7 +407,15 @@ MAGNET -
+
+
+
+ + + {formatSpeed(totalDownloadSpeed)} + +
+