From df7d68a6e247ec078a4d1d21fe99d65f249e3604 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Wed, 12 Mar 2025 20:20:33 +0100 Subject: [PATCH] Have "Create Playlist" always create playlist from all tracks Change-Id: Ic04724139d03417f7cac55f3cfa5aed5610c9747 --- apps/playlist_catalog.c | 7 +++++-- apps/tree.c | 2 +- manual/main_menu/main.tex | 7 +------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index 6998bda95e..d9386bf5bc 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c @@ -348,13 +348,16 @@ static int add_to_playlist(const char* playlist, bool new_playlist, else if (sel_attr & ATTR_DIRECTORY) { /* search directory for tracks and append to playlist */ - bool recurse = false; + bool recurse; const char *lines[] = { ID2P(LANG_RECURSE_DIRECTORY_QUESTION), sel}; const struct text_message message={lines, 2}; struct add_track_context context; - if (global_settings.recursive_dir_insert != RECURSE_ASK) + + if (sel[1] == '\0' && sel[0] == PATH_ROOTCHR) + recurse = true; + else if (global_settings.recursive_dir_insert != RECURSE_ASK) recurse = (bool)global_settings.recursive_dir_insert; else { diff --git a/apps/tree.c b/apps/tree.c index 97eb0b1e6d..8c558c67be 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -1070,7 +1070,7 @@ int create_playlist(void) { bool ret; trigger_cpu_boost(); - ret = catalog_add_to_a_playlist(tc.currdir, ATTR_DIRECTORY, true, NULL, NULL); + ret = catalog_add_to_a_playlist(PATH_ROOTSTR, ATTR_DIRECTORY, true, NULL, NULL); cancel_cpu_boost(); return (ret) ? 1 : 0; diff --git a/manual/main_menu/main.tex b/manual/main_menu/main.tex index f90eb7f70e..a9e78a6bf8 100644 --- a/manual/main_menu/main.tex +++ b/manual/main_menu/main.tex @@ -174,12 +174,7 @@ from the current playlist, so that bookmarks can be created (see \reference{ref:createbookmark}). \item[Create Playlist:] - Rockbox will create a playlist with all tracks from the directory that is -currently selected in the \setting{File Browser}. -If you have selected the root level, or your Playlist directory, Rockbox -will create a playlist with tracks from the root directory. -Sub-directories will be included, unless the option to recursively insert -directories has been turned off, see \reference{ref:PlaylistOptions}. + Rockbox will create a playlist with all tracks from your player. \item[Reset Playlist Catalogue Directory:] Will reset the default location for playlists to the \fname{/Playlists}