Try to eliminate occasional short pause at start of track
Made playing the track the last thing in play_next()
This commit is contained in:
parent
128fe2925f
commit
b0278b92b0
@ -1122,6 +1122,18 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
if not track_sequence.now.path:
|
||||
log.error("No path for next track")
|
||||
return
|
||||
|
||||
# Notify model
|
||||
self.active_proxy_model().current_track_started()
|
||||
|
||||
# Note that track is now playing
|
||||
self.playing = True
|
||||
|
||||
# Disable play next controls
|
||||
self.disable_play_next_controls()
|
||||
|
||||
# Update headers
|
||||
self.update_headers()
|
||||
track_sequence.now.start()
|
||||
self.music.play(track_sequence.now.path, position)
|
||||
|
||||
@ -1135,21 +1147,25 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
volume = self.music.player.audio_get_volume()
|
||||
if volume < Config.VOLUME_VLC_DEFAULT:
|
||||
self.music.set_volume()
|
||||
log.warning(f"Reset from {volume=}")
|
||||
log.debug(f"Reset from {volume=}")
|
||||
break
|
||||
sleep(0.1)
|
||||
|
||||
# Notify model
|
||||
self.active_proxy_model().current_track_started()
|
||||
# Try making playing the last thing we do here to see whether
|
||||
# the occasional short pause at the start of the track can be
|
||||
# eliminated.
|
||||
|
||||
# Note that track is now playing
|
||||
self.playing = True
|
||||
# # Notify model
|
||||
# self.active_proxy_model().current_track_started()
|
||||
|
||||
# Disable play next controls
|
||||
self.disable_play_next_controls()
|
||||
# # Note that track is now playing
|
||||
# self.playing = True
|
||||
|
||||
# Update headers
|
||||
self.update_headers()
|
||||
# # Disable play next controls
|
||||
# self.disable_play_next_controls()
|
||||
|
||||
# # Update headers
|
||||
# self.update_headers()
|
||||
|
||||
def preview(self) -> None:
|
||||
"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user