From 3ef49d9c5e92579dcb7e51e081b27fddf8c7b9b4 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Fri, 26 May 2023 03:24:45 +0200 Subject: PictureFlow: Make Shuffle options available The "Playing Next..." menu couldn't display any options for shuffling tracks of an album before Change-Id: I54f4497394fb29877bf8bce0ef95a27c82eb2279 --- apps/plugins/pictureflow/pictureflow.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 75504cf17e..b21faf1dd8 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -4188,7 +4188,7 @@ static int context_menu(void) { char album_name[MAX_PATH]; char *file_name = get_track_filename(show_tracks_while_browsing ? 0 : pf_tracks.sel); - int attr; + int attr = FILE_ATTR_AUDIO; enum { PF_CURRENT_PLAYLIST = 0, @@ -4205,13 +4205,15 @@ static int context_menu(void) NULL, NULL, false)) { case PF_CURRENT_PLAYLIST: - rb->onplay_show_playlist_menu(file_name, - &pf_current_playlist_insert); + if (insert_whole_album && pf_tracks.count > 1) + { + attr = ATTR_DIRECTORY; + file_name = NULL; + } + rb->onplay_show_playlist_menu(file_name, attr, &pf_current_playlist_insert); return 0; case PF_CATALOG: - if (!insert_whole_album) - attr = FILE_ATTR_AUDIO; - else + if (insert_whole_album) { /* add a leading slash so that catalog_add_to_a_playlist later prefills the name when creating a new playlist */ -- cgit v1.2.3