diff --git a/src/app/torrent.js b/src/app/torrent.js
index ad4f715..7080519 100644
--- a/src/app/torrent.js
+++ b/src/app/torrent.js
@@ -163,7 +163,8 @@ export default class Torrent extends Component {
downloaded: false,
startingDownloading: false,
downloadProgress: {},
- downloadRemoveOnDone: false
+ downloadRemoveOnDone: false,
+ downloadPaused: false,
}
constructor(props)
{
@@ -172,13 +173,14 @@ export default class Torrent extends Component {
const download = props.download || props.torrent.download
if(download)
{
- const { progress, downloaded, downloadSpeed, removeOnDone } = download
+ const { progress, downloaded, downloadSpeed, removeOnDone, paused } = download
this.state.downloadProgress = {
progress, downloaded, downloadSpeed
}
this.state.downloading = progress < 1
this.state.downloaded = progress === 1
- this.state.downloadRemoveOnDone = removeOnDone
+ this.state.downloadRemoveOnDone = removeOnDone
+ this.state.downloadPaused = paused
}
}
@@ -224,7 +226,8 @@ export default class Torrent extends Component {
return;
this.setState({
- downloadRemoveOnDone: options.removeOnDone
+ downloadRemoveOnDone: options.removeOnDone,
+ downloadPaused: options.paused
})
}
window.torrentSocket.on('downloadUpdate', this.downloadUpdate);
@@ -250,7 +253,8 @@ export default class Torrent extends Component {
if(torrent.good > 0 || torrent.bad > 0)
torrentRating = Math.round(rating(torrent.good, torrent.bad) * 100);
- const canDeleteDownloadAfterFinish = (this.state.downloading || this.state.startingDownloading) && !this.state.downloaded
+ const canDeleteDownloadAfterFinish = (this.state.downloading || this.state.startingDownloading) && !this.state.downloaded
+ const canPause = (this.state.downloading || this.state.startingDownloading)
return (
@@ -354,7 +358,34 @@ export default class Torrent extends Component {
}
leftIcon={contentIcon(torrent.contentType, torrent.contentCategory, torrent.contentCategory != 'xxx' ? (torrent.peer ? '#6f5ee0' : 'grey') : (torrent.peer ? '#9083e2' : '#d3d3d3'))}
rightIcon={
-
+
+ {
+ // mark delete after finish
+ canPause
+ &&
+
+
+
+
+
+ }
{
// mark delete after finish
canDeleteDownloadAfterFinish
@@ -364,7 +395,7 @@ export default class Torrent extends Component {