summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 4f748204df..045af275bc 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -302,7 +302,7 @@ static int add_to_playlist(void* arg)
302 302
303 /* warn if replacing the playlist */ 303 /* warn if replacing the playlist */
304 if (new_playlist && !warn_on_pl_erase()) 304 if (new_playlist && !warn_on_pl_erase())
305 return 0; 305 return 1;
306 306
307 splash(0, ID2P(LANG_WAIT)); 307 splash(0, ID2P(LANG_WAIT));
308 308
@@ -340,7 +340,7 @@ static int add_to_playlist(void* arg)
340 } 340 }
341 341
342 playlist_set_modified(NULL, true); 342 playlist_set_modified(NULL, true);
343 return false; 343 return 0;
344} 344}
345 345
346static bool view_playlist(void) 346static bool view_playlist(void)
@@ -1255,7 +1255,7 @@ static int execute_hotkey(bool is_wps)
1255} 1255}
1256#endif /* HOTKEY */ 1256#endif /* HOTKEY */
1257 1257
1258int onplay(char* file, int attr, int from_context, bool hotkey) 1258int onplay(char* file, int attr, int from_context, bool hotkey, int customaction)
1259{ 1259{
1260 const struct menu_item_ex *menu; 1260 const struct menu_item_ex *menu;
1261 onplay_result = ONPLAY_OK; 1261 onplay_result = ONPLAY_OK;
@@ -1294,6 +1294,13 @@ int onplay(char* file, int attr, int from_context, bool hotkey)
1294#else 1294#else
1295 (void)hotkey; 1295 (void)hotkey;
1296#endif 1296#endif
1297 if (customaction == ONPLAY_CUSTOMACTION_SHUFFLE_SONGS) {
1298 int returnCode = add_to_playlist(&addtopl_replace_shuffled);
1299 if (returnCode == 1)
1300 // User did not want to erase his current playlist, so let's show again the database main menu
1301 return ONPLAY_RELOAD_DIR;
1302 return ONPLAY_START_PLAY;
1303 }
1297 1304
1298 push_current_activity(ACTIVITY_CONTEXTMENU); 1305 push_current_activity(ACTIVITY_CONTEXTMENU);
1299 if (from_context == CONTEXT_WPS) 1306 if (from_context == CONTEXT_WPS)