Fix missing speed on SAB cards and remove incorrect missing pieces display
All checks were successful
Build and Push Docker Image / build (push) Successful in 16s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 29s
CI / Security audit (push) Successful in 59s
CI / Tests & coverage (push) Successful in 59s

This commit is contained in:
2026-05-20 00:47:07 +01:00
parent 05d11975e6
commit d11f11be69

View File

@@ -865,8 +865,8 @@ function createDownloadCard(download) {
progressText.textContent = download.progress + '%'; progressText.textContent = download.progress + '%';
valueDiv.appendChild(progressText); valueDiv.appendChild(progressText);
// Missing pieces text // Missing pieces text (only for torrent clients like qBittorrent)
if (missingMb > 0 && totalMb > 0) { if (download.client && (download.client === 'qbittorrent' || download.client === 'rtorrent') && missingMb > 0 && totalMb > 0) {
const missingText = document.createElement('span'); const missingText = document.createElement('span');
missingText.className = 'missing-text'; missingText.className = 'missing-text';
missingText.textContent = `(missing ${missingMb.toFixed(1)} of ${totalMb.toFixed(1)} MB)`; missingText.textContent = `(missing ${missingMb.toFixed(1)} of ${totalMb.toFixed(1)} MB)`;
@@ -878,7 +878,7 @@ function createDownloadCard(download) {
details.appendChild(progressItem); details.appendChild(progressItem);
} }
if (download.speed) { if (download.speed !== undefined && download.speed !== null) {
const speed = createDetailItem('Speed', download.speed); const speed = createDetailItem('Speed', download.speed);
details.appendChild(speed); details.appendChild(speed);
} }