Made the progress slider not be at the end when the track is paused and corrected the formula for setting the remaining time in unpause_track_progress_timer()

This commit is contained in:
The Wobbler 2024-12-21 19:14:17 +01:00
parent 45d97f5aeb
commit 44c9fafb2c
2 changed files with 5 additions and 1 deletions

View file

@ -26,6 +26,10 @@ class GUICommunication:
def update_progress(self): def update_progress(self):
remaining = self.app.player.track_progress_timer.remainingTime() remaining = self.app.player.track_progress_timer.remainingTime()
if remaining == -1:
remaining = self.app.player.remaining_time
track_duration = self.app.player.playing_track.duration track_duration = self.app.player.playing_track.duration
progress = track_duration - remaining progress = track_duration - remaining

View file

@ -111,5 +111,5 @@ class Player:
self.track_progress_timer.stop() self.track_progress_timer.stop()
def unpause_track_progress_timer(self): def unpause_track_progress_timer(self):
self.track_progress_timer.start(self.playing_track.duration - self.remaining_time) self.track_progress_timer.start(self.remaining_time)