Skip to content

Commit

Permalink
fix(app/download_processor): negative estimated size
Browse files Browse the repository at this point in the history
  • Loading branch information
rhunk committed Apr 10, 2024
1 parent a301217 commit 79a58ee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class DownloadProcessor (
fun updateDownloadProgress() {
pendingTask.updateProgress(
inputMediaProgress.values.joinToString("\n"),
progress = (inputMediaDownloadedBytes.values.sum() * 100 / totalSize).toInt().coerceIn(0, 100)
progress = (inputMediaDownloadedBytes.values.sum() * 100 / totalSize.coerceAtLeast(1)).toInt().coerceIn(0, 100)
)
}

Expand Down

0 comments on commit 79a58ee

Please sign in to comment.