diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-05-21 21:24:27 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-05-21 21:24:27 +0200 |
| commit | 70279c4c62ae4180706c0d27c5bbcf275c903100 (patch) | |
| tree | 486c471b61618a96d98d8603db188c2101dbb7bd /player.go | |
| parent | 95a65d718c3bc50324a0f4a75aa5a586eeadc4ef (diff) | |
| download | WRMS-70279c4c62ae4180706c0d27c5bbcf275c903100.tar.gz WRMS-70279c4c62ae4180706c0d27c5bbcf275c903100.zip | |
continue playback when adding a song to an empty queue
Now WRMS only switches the playback state when an admin calls the
/playpause endpoint.
When the queue runs out of songs the state is kept and continues
when a new song is added.
Diffstat (limited to 'player.go')
| -rw-r--r-- | player.go | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -68,13 +68,11 @@ func (player *Player) runMpv() { wrms := player.wrms - llog.Info("mpv finished. Resetting mpv, the current song and call play") + llog.Info("mpv finished. Resetting mpv, and calling next") player.mpv = nil - wrms.Playing = false player.Backends[wrms.CurrentSong.Source].OnSongFinished(&wrms.CurrentSong) - wrms.CurrentSong.Uri = "" - wrms.PlayPause() + wrms.Next() } func (player *Player) PlayUri(uri string) { |
