Add Play/Shuffle All buttons to playlists context menu

This commit is contained in:
Arkadiusz Fal 2022-01-02 20:39:54 +01:00
parent e29982454b
commit aec7480353

View File

@ -17,10 +17,11 @@ struct AppSidebarPlaylists: View {
}
.id(playlist.id)
.contextMenu {
Button("Add to queue...") {
playlists.find(id: playlist.id)?.videos.forEach { video in
player.enqueueVideo(video)
}
Button("Play All") {
player.play(playlists.find(id: playlist.id)?.videos ?? [])
}
Button("Shuffle All") {
player.play(playlists.find(id: playlist.id)?.videos ?? [], shuffling: true)
}
Button("Edit") {
navigation.presentEditPlaylistForm(playlists.find(id: playlist.id))