summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/tree.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 4499863..acfc7ee 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -906,9 +906,16 @@ bool dirbrowse(char *root)
if ( global_settings.resume )
strncpy(global_settings.resume_file,
currdir, MAX_PATH);
+
start_index =
build_playlist(dircursor+dirstart);
+ /* when shuffling dir.: play all files even if the
+ file selected by user is not the first one */
+ if (global_settings.playlist_shuffle
+ && !global_settings.play_selected)
+ start_index = 0;
+
/* it is important that we get back the index
in the (shuffled) list and store that */
start_index = play_list(currdir, NULL,