summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/filetree.c17
-rw-r--r--apps/filetree.h3
2 files changed, 7 insertions, 13 deletions
diff --git a/apps/filetree.c b/apps/filetree.c
index 1944713d13..136a3f2ff2 100644
--- a/apps/filetree.c
+++ b/apps/filetree.c
@@ -89,7 +89,8 @@ int ft_build_playlist(struct tree_context* c, int start_index)
89 * avoid allocating yet another path buffer on the stack (and save some 89 * avoid allocating yet another path buffer on the stack (and save some
90 * code; the caller typically needs to create the full pathname anyway)... 90 * code; the caller typically needs to create the full pathname anyway)...
91 */ 91 */
92bool ft_play_playlist(char* pathname, char* dirname, char* filename, bool skip_dyn_warning) 92bool ft_play_playlist(char* pathname, char* dirname,
93 char* filename, bool skip_warn_and_bookmarks)
93{ 94{
94 if (global_settings.party_mode && audio_status()) 95 if (global_settings.party_mode && audio_status())
95 { 96 {
@@ -97,22 +98,14 @@ bool ft_play_playlist(char* pathname, char* dirname, char* filename, bool skip_d
97 return false; 98 return false;
98 } 99 }
99 100
100 if (bookmark_autoload(pathname)) 101 if (!skip_warn_and_bookmarks)
101 { 102 {
102 return false; 103 if (bookmark_autoload(pathname) || !warn_on_pl_erase())
104 return false;
103 } 105 }
104 106
105 splash(0, ID2P(LANG_WAIT)); 107 splash(0, ID2P(LANG_WAIT));
106 108
107 /* about to create a new current playlist...
108 * allow user to cancel the operation.
109 * Do not show if skip_dyn_warning is true */
110 if (!skip_dyn_warning)
111 {
112 if (!warn_on_pl_erase())
113 return false;
114 }
115
116 if (playlist_create(dirname, filename) != -1) 109 if (playlist_create(dirname, filename) != -1)
117 { 110 {
118 if (global_settings.playlist_shuffle) 111 if (global_settings.playlist_shuffle)
diff --git a/apps/filetree.h b/apps/filetree.h
index 178ba0e973..7931c3c454 100644
--- a/apps/filetree.h
+++ b/apps/filetree.h
@@ -26,6 +26,7 @@ int ft_load(struct tree_context* c, const char* tempdir);
26int ft_enter(struct tree_context* c); 26int ft_enter(struct tree_context* c);
27int ft_exit(struct tree_context* c); 27int ft_exit(struct tree_context* c);
28int ft_build_playlist(struct tree_context* c, int start_index); 28int ft_build_playlist(struct tree_context* c, int start_index);
29bool ft_play_playlist(char* pathname, char* dirname, char* filename, bool skip_dyn_warning); 29bool ft_play_playlist(char* pathname, char* dirname,
30 char* filename, bool skip_warn_and_bookmarks);
30 31
31#endif 32#endif