Fix clocks for resumed track
This commit is contained in:
parent
2ca1d30609
commit
da267562ea
@ -1399,6 +1399,12 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
)
|
||||
self.play_next(self.previous_track_position)
|
||||
|
||||
# Adjust track info so that clocks and graph are correct.
|
||||
# Easiest way is to fake the start time.
|
||||
if self.current_track.start_time and self.current_track.duration:
|
||||
elapsed_ms = self.current_track.duration * self.previous_track_position
|
||||
self.current_track.start_time -= timedelta(milliseconds=elapsed_ms)
|
||||
|
||||
# If a track was playing when we were called, get details to
|
||||
# set it as the next track
|
||||
if playing_track:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user