diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2022-07-26 22:23:37 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2022-07-26 22:23:37 +0200 |
| commit | 33fd4442dd8297d02d284e82cf09bbfec01c705a (patch) | |
| tree | be15f36161859c24971f62b3f89c4effe9c1e349 /playlist.go | |
| parent | 7e15ad1d8af4ee27f6c1d31e7b1608e2d751c402 (diff) | |
| download | WRMS-33fd4442dd8297d02d284e82cf09bbfec01c705a.tar.gz WRMS-33fd4442dd8297d02d284e82cf09bbfec01c705a.zip | |
add youtube backend
Diffstat (limited to 'playlist.go')
| -rw-r--r-- | playlist.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/playlist.go b/playlist.go index b37ab3d..8f17055 100644 --- a/playlist.go +++ b/playlist.go @@ -36,6 +36,9 @@ func (pl *Playlist) Pop() any { } func (pl *Playlist) PopSong() *Song { + if len(*pl) == 0 { + return nil + } return heap.Pop(pl).(*Song) } |
