diff --git a/internal/player/player.go b/internal/player/player.go index 6d1381d3..0a538bbf 100644 --- a/internal/player/player.go +++ b/internal/player/player.go @@ -77,7 +77,6 @@ func (p *Player) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case p.speed >= 0: frameDiff = 1 if p.frame+frameDiff >= len(p.movie.Frames) { - p.log.Info().Msg("Finished movie") return p, Quit } case p.frame <= 0: @@ -96,7 +95,6 @@ func (p *Player) Update(msg tea.Msg) (tea.Model, tea.Cmd) { duration := p.movie.Frames[p.frame].CalcDuration(speed) for duration < time.Second/15 { if p.frame+frameDiff >= len(p.movie.Frames) { - p.log.Info().Msg("Finished movie") return p, Quit } else if p.frame+frameDiff <= 0 { p.speed = 1 @@ -169,7 +167,11 @@ func (p *Player) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } } case quitMsg: - p.log.Info().Msg("Disconnected early") + if p.frame >= len(p.movie.Frames)-1 { + p.log.Info().Msg("Finished movie") + } else { + p.log.Info().Msg("Disconnected early") + } p.clearTimeouts() p.zone.Close() return p, tea.Quit //nolint:forbidigo