Fix missing speed on SAB cards and remove incorrect missing pieces display
All checks were successful
All checks were successful
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user