Merge pull request #58 from acaloiaro/fix-time-elapsed-when-paused

fix: elapsed time continues ticking whilst paused/not playing
This commit is contained in:
Adriano Caloiaro 2026-04-25 09:55:27 -06:00 committed by GitHub
commit f350a20f84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -163,6 +163,10 @@ func configureEventHandling() {
go func() {
c := time.Tick(1 * time.Second)
for range c {
// don't show elapsed time updates when playback is paused/not playing
if !ctx.IsPlaying {
continue
}
elapsed := time.Since(ctx.View.NowPlaying.Track.StartTime)
// If the current time is past the end of the track, then a new track is playing and the now playing track needs