mirror of https://github.com/Kylart/KawAnime.git
Fixed remaining time for torrents
This commit is contained in:
parent
37114f3e68
commit
4497ce0625
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue