From d11f11be693bc5660765d99d14afe2f414693b7b Mon Sep 17 00:00:00 2001 From: Gronod Date: Wed, 20 May 2026 00:47:07 +0100 Subject: [PATCH] Fix missing speed on SAB cards and remove incorrect missing pieces display --- public/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/app.js b/public/app.js index 66007a2..ecdc0f4 100644 --- a/public/app.js +++ b/public/app.js @@ -865,8 +865,8 @@ function createDownloadCard(download) { progressText.textContent = download.progress + '%'; valueDiv.appendChild(progressText); - // Missing pieces text - if (missingMb > 0 && totalMb > 0) { + // Missing pieces text (only for torrent clients like qBittorrent) + if (download.client && (download.client === 'qbittorrent' || download.client === 'rtorrent') && missingMb > 0 && totalMb > 0) { const missingText = document.createElement('span'); missingText.className = 'missing-text'; missingText.textContent = `(missing ${missingMb.toFixed(1)} of ${totalMb.toFixed(1)} MB)`; @@ -878,7 +878,7 @@ function createDownloadCard(download) { details.appendChild(progressItem); } - if (download.speed) { + if (download.speed !== undefined && download.speed !== null) { const speed = createDetailItem('Speed', download.speed); details.appendChild(speed); }