diff --git a/renderer/views/torrent-list.js b/renderer/views/torrent-list.js index 718438d4..35cc5943 100644 --- a/renderer/views/torrent-list.js +++ b/renderer/views/torrent-list.js @@ -49,17 +49,28 @@ function renderTorrent (state, dispatch, torrent) { // Renders the torrent name and download progress function renderTorrentMetadata (torrent) { + var progressPercent = 0 + var progressBytes = 0 + + if (torrent.progress) { + progressPercent = Math.floor(100 * torrent.progress) + } + + if (torrent.length && torrent.progress) { + progressBytes = torrent.length * torrent.progress + } + return hx`
`