diff --git a/src/app/torrent.js b/src/app/torrent.js
index ca86e2a..6fdb3d0 100644
--- a/src/app/torrent.js
+++ b/src/app/torrent.js
@@ -167,9 +167,9 @@ export default class Torrent extends Component {
super(props)
if(props.download)
{
- const { progress, downloaded, speed } = props.download
+ const { progress, downloaded, downloadSpeed } = props.download
this.state.downloadProgress = {
- progress, downloaded, speed
+ progress, downloaded, downloadSpeed
}
}
}
@@ -268,15 +268,6 @@ export default class Torrent extends Component {
formatBytes(torrent.size, 1) + ' (' + torrent.files + ' files)'
}
- {
- this.state.downloading
- &&
-
- }
{
torrent.path && torrent.path.length > 0
@@ -312,7 +303,21 @@ export default class Torrent extends Component {
/>
= 50 ? '#00E676' : '#FF3D00', width: '190px'}}>{__('Torrent rating')}: {torrentRating}%
- }
+ }
+ {
+ this.state.downloading
+ &&
+
+
{__('downloading')}:
+
+
{this.state.downloadProgress && (this.state.downloadProgress.progress * 100).toFixed(1)}%
+
{this.state.downloadProgress && formatBytes(this.state.downloadProgress.downloadSpeed || 0, 0)}/s
+
+ }
}
diff --git a/src/background/api.js b/src/background/api.js
index eb26f49..2948c9d 100644
--- a/src/background/api.js
+++ b/src/background/api.js
@@ -606,7 +606,7 @@ module.exports = async ({
send('downloadProgress', torrent.infoHash, {
received: bytes,
downloaded: torrent.downloaded,
- speed: torrent.downloadSpeed,
+ downloadSpeed: torrent.downloadSpeed,
progress: torrent.progress,
timeRemaining: torrent.timeRemaining
})
@@ -648,7 +648,7 @@ module.exports = async ({
received: torrent.received,
downloaded: torrent.downloaded,
progress: torrent.progress,
- speed: torrent.downloadSpeed
+ downloadSpeed: torrent.downloadSpeed
})))
})