aboutsummaryrefslogtreecommitdiff
path: root/playlist.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2022-07-26 22:23:37 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2022-07-26 22:23:37 +0200
commit33fd4442dd8297d02d284e82cf09bbfec01c705a (patch)
treebe15f36161859c24971f62b3f89c4effe9c1e349 /playlist.go
parent7e15ad1d8af4ee27f6c1d31e7b1608e2d751c402 (diff)
downloadWRMS-33fd4442dd8297d02d284e82cf09bbfec01c705a.tar.gz
WRMS-33fd4442dd8297d02d284e82cf09bbfec01c705a.zip
add youtube backend
Diffstat (limited to 'playlist.go')
-rw-r--r--playlist.go3
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)
}