Fixed the issue that the progress timer was further than the playback when you pause too often.

This commit is contained in:
The Wobbler 2025-01-24 14:13:23 +01:00
parent 096415fe22
commit bd0fd769d9

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3 #!/usr/bin/python3
from PyQt6.QtCore import QTimer from PyQt6.QtCore import Qt, QTimer
class TrackProgress: class TrackProgress:
@ -10,6 +10,7 @@ class TrackProgress:
self.remaining_time = 0 self.remaining_time = 0
self.timer = QTimer() self.timer = QTimer()
self.timer.setTimerType(Qt.TimerType.PreciseTimer)
self.timer.timeout.connect(self.track_finished) self.timer.timeout.connect(self.track_finished)
self.timer.setSingleShot(True) self.timer.setSingleShot(True)