Fix downloaded size in the torrent list
The downloaded size should never be more than the total size.
This commit is contained in:
parent
135ddd0c93
commit
93e427fc73
@ -16,8 +16,11 @@ export const Progress = ({ torrent }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pretty sizes
|
// Pretty sizes
|
||||||
const downloadedSize = prettySize(torrent.status.downloaded_size);
|
|
||||||
const totalSize = prettySize(torrent.status.total_size);
|
const totalSize = prettySize(torrent.status.total_size);
|
||||||
|
const downloadedSize =
|
||||||
|
torrent.status.downloaded_size >= torrent.status.total_size
|
||||||
|
? totalSize
|
||||||
|
: prettySize(torrent.status.downloaded_size);
|
||||||
const downloadRate = prettySize(torrent.status.download_rate) + "/s";
|
const downloadRate = prettySize(torrent.status.download_rate) + "/s";
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user