From 6c81e0dcaf5905c6fac3fe4b62dffaf67027d785 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 30 Jun 2023 18:08:07 +0200 Subject: fix double _next call and move mpv termination to Next Due to an logic error was _next() a second time from runMpv after the mpv subprocess was terminated by the first Next() call. --- player.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player.go') diff --git a/player.go b/player.go index a330412..9a3723f 100644 --- a/player.go +++ b/player.go @@ -107,9 +107,9 @@ func (player *Player) runMpv() { player.Backends[currentSong.Source].OnSongFinished(currentSong) // mpv terminated because it finished playing the song - if err != nil { + if err == nil { llog.Info("mpv finished. Resetting mpv, and calling next") - wrms.Next() + wrms._lockedNext() } } -- cgit v1.2.3