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:
parent
45d97f5aeb
commit
44c9fafb2c
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue