Fixed remaining time for torrents

This commit is contained in:
Kylart 2019-07-20 20:01:02 +02:00
parent 37114f3e68
commit 4497ce0625
1 changed files with 3 additions and 5 deletions

View File

@ -38,7 +38,6 @@ export default {
data: () => ({
isPaused: false,
creationDate: moment(),
timeRemaining: ''
}),
@ -77,11 +76,10 @@ export default {
return
}
const endsIn = parseInt(Date.now() + torrent.timeRemaining)
this.timeRemaining = torrent.timeRemaining
? 'Ends ' + this.creationDate
.clone()
.add(torrent.timeRemaining)
.fromNow()
? 'Ends ' + moment(endsIn).fromNow()
: 'Unknown time remaining...'
},
actOnTorrent (action) {