From 0a8e25ea698333c73c50fc84e3334e1079606a10 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 31 May 2023 18:14:25 +0200 Subject: allow admins to skip or delete songs --- playlist.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'playlist.go') diff --git a/playlist.go b/playlist.go index 249bad5..becc85e 100644 --- a/playlist.go +++ b/playlist.go @@ -56,3 +56,8 @@ func (pl *Playlist) Adjust(s *Song) { heap.Fix(pl, s.index) llog.DDebug("adjusting song %p in the playlist (%p) -> %v", s, pl, pl) } + +func (pl *Playlist) RemoveSong(s *Song) { + heap.Remove(pl, s.index) + llog.DDebug("removing song %p in the playlist (%p) -> %v", s, pl, pl) +} -- cgit v1.2.3