From aec74803530b4ed2f4d14aa3729c5cbbaf23811a Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sun, 2 Jan 2022 20:39:54 +0100 Subject: [PATCH] Add Play/Shuffle All buttons to playlists context menu --- Shared/Navigation/AppSidebarPlaylists.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Shared/Navigation/AppSidebarPlaylists.swift b/Shared/Navigation/AppSidebarPlaylists.swift index d12cb15c..313155df 100644 --- a/Shared/Navigation/AppSidebarPlaylists.swift +++ b/Shared/Navigation/AppSidebarPlaylists.swift @@ -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))