diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-05-21 17:50:51 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-05-21 17:50:51 +0200 |
| commit | eb76608e7287db4b26d877deccce138daee849da (patch) | |
| tree | 9117519023cf91b48cbcb28e69be90e0f16b345b /player.go | |
| parent | 0db007609efb842f43d837988eff15b31765f615 (diff) | |
| download | WRMS-eb76608e7287db4b26d877deccce138daee849da.tar.gz WRMS-eb76608e7287db4b26d877deccce138daee849da.zip | |
add OnSongFinished backend hook allowing to remove uploaded songs
Diffstat (limited to 'player.go')
| -rw-r--r-- | player.go | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -66,11 +66,15 @@ func (player *Player) runMpv() { llog.Fatal(err.Error()) } + wrms := player.wrms + llog.Info("mpv finished. Resetting mpv, the current song and call play") player.mpv = nil - player.wrms.Playing = false - player.wrms.CurrentSong.Uri = "" - player.wrms.PlayPause() + wrms.Playing = false + + player.Backends[wrms.CurrentSong.Source].OnSongFinished(&wrms.CurrentSong) + wrms.CurrentSong.Uri = "" + wrms.PlayPause() } func (player *Player) PlayUri(uri string) { |
