Added indicator icon that shows on the currently playing track.

This commit is contained in:
The Wobbler 2024-12-29 18:55:55 +01:00
parent 29cc80feae
commit efcae74382
5 changed files with 41 additions and 10 deletions

View file

@ -26,7 +26,7 @@ class TrackControl:
self.connect()
self.on_track_start()
self.on_track_change(None, None)
def connect(self):
self.track_control.previous_button.triggered.connect(self.previous_track)
@ -52,9 +52,12 @@ class TrackControl:
if self.app.player.current_playlist.has_tracks():
self.app.player.seek(self.track_control.track_progress_slider.value())
def on_track_start(self):
def on_track_change(self, previous_track, track):
if self.app.player.playing:
duration = self.app.player.current_playlist.current_track.duration
duration = 0
if track:
duration = track.duration
self.track_control.track_progress_slider.setRange(
0,