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: () => ({
|
data: () => ({
|
||||||
isPaused: false,
|
isPaused: false,
|
||||||
creationDate: moment(),
|
|
||||||
timeRemaining: ''
|
timeRemaining: ''
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
@ -77,11 +76,10 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const endsIn = parseInt(Date.now() + torrent.timeRemaining)
|
||||||
|
|
||||||
this.timeRemaining = torrent.timeRemaining
|
this.timeRemaining = torrent.timeRemaining
|
||||||
? 'Ends ' + this.creationDate
|
? 'Ends ' + moment(endsIn).fromNow()
|
||||||
.clone()
|
|
||||||
.add(torrent.timeRemaining)
|
|
||||||
.fromNow()
|
|
||||||
: 'Unknown time remaining...'
|
: 'Unknown time remaining...'
|
||||||
},
|
},
|
||||||
actOnTorrent (action) {
|
actOnTorrent (action) {
|
||||||
|
|
Loading…
Reference in New Issue