aboutsummaryrefslogtreecommitdiff
path: root/player.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-06-30 18:08:07 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-06-30 18:09:47 +0200
commit6c81e0dcaf5905c6fac3fe4b62dffaf67027d785 (patch)
tree49ac3fb95a6832b8fb770137b583a7f5d00756ab /player.go
parent8b29c4431d42f308f2f52d4c35129dae5d86a136 (diff)
downloadWRMS-6c81e0dcaf5905c6fac3fe4b62dffaf67027d785.tar.gz
WRMS-6c81e0dcaf5905c6fac3fe4b62dffaf67027d785.zip
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.
Diffstat (limited to 'player.go')
-rw-r--r--player.go4
1 files changed, 2 insertions, 2 deletions
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()
}
}