diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-05-31 18:14:25 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-05-31 18:14:25 +0200 |
| commit | 0a8e25ea698333c73c50fc84e3334e1079606a10 (patch) | |
| tree | cbb29a6c23de33214e67b951a75f1c554ba2fcef /playlist.go | |
| parent | 1f89f1d22ced0bb107514efb7e861247c2941a70 (diff) | |
| download | WRMS-0a8e25ea698333c73c50fc84e3334e1079606a10.tar.gz WRMS-0a8e25ea698333c73c50fc84e3334e1079606a10.zip | |
allow admins to skip or delete songs
Diffstat (limited to 'playlist.go')
| -rw-r--r-- | playlist.go | 5 |
1 files changed, 5 insertions, 0 deletions
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) +} |
