Fix:Podcast episode time remaining shown on button showing 0 seconds after toggling mark as finished

This commit is contained in:
advplyr 2023-12-31 15:32:44 -06:00
parent fececd4651
commit d38058e1d2
2 changed files with 6 additions and 2 deletions

View file

@ -135,7 +135,9 @@ export default {
if (this.streamIsPlaying) return 'Playing'
if (!this.itemProgress) return this.$elapsedPretty(this.episode?.duration || 0)
if (this.userIsFinished) return 'Finished'
const remaining = Math.floor(this.itemProgress.duration - this.itemProgress.currentTime)
const duration = this.itemProgress.duration || this.episode?.duration || 0
const remaining = Math.floor(duration - this.itemProgress.currentTime)
return `${this.$elapsedPretty(remaining)} left`
}
},