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); }