summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index d262eced3d..7655a8e075 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -134,6 +134,18 @@ static bool list_viewers(void)
134 return false; 134 return false;
135} 135}
136 136
137static bool shuffle_playlist(void)
138{
139 int seed, index;
140
141 seed = playlist_get_seed(NULL);
142 index = playlist_get_first_index(NULL);
143
144 playlist_shuffle(seed, index);
145
146 return false;
147}
148
137static bool save_playlist(void) 149static bool save_playlist(void)
138{ 150{
139 char filename[MAX_PATH+1]; 151 char filename[MAX_PATH+1];
@@ -237,8 +249,8 @@ static bool view_playlist(void)
237/* Sub-menu for playlist options */ 249/* Sub-menu for playlist options */
238static bool playlist_options(void) 250static bool playlist_options(void)
239{ 251{
240 struct menu_item items[10]; 252 struct menu_item items[11];
241 struct playlist_args args[10]; /* increase these 2 if you add entries! */ 253 struct playlist_args args[11]; /* increase these 2 if you add entries! */
242 int m, i=0, pstart=0, result; 254 int m, i=0, pstart=0, result;
243 bool ret = false; 255 bool ret = false;
244 256
@@ -262,6 +274,11 @@ static bool playlist_options(void)
262 items[i].function = save_playlist; 274 items[i].function = save_playlist;
263 i++; 275 i++;
264 pstart++; 276 pstart++;
277
278 items[i].desc = ID2P(LANG_SHUFFLE_PLAYLIST);
279 items[i].function = shuffle_playlist;
280 i++;
281 pstart++;
265 } 282 }
266 283
267 if (context == CONTEXT_TREE) 284 if (context == CONTEXT_TREE)