From e03faf835dd7b879f589e3dc080991bab86dfae7 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sat, 17 Sep 2011 09:29:19 +0000 Subject: [PATCH] Add an option to shuffle the playlist in the playlist viewer git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30563 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist_viewer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 43c0c0142e..ffaefebd5f 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -450,7 +450,7 @@ static int onplay_menu(int index) playlist_buffer_get_track(&viewer.buffer, index); MENUITEM_STRINGLIST(menu_items, ID2P(LANG_PLAYLIST), NULL, ID2P(LANG_CURRENT_PLAYLIST), ID2P(LANG_CATALOG), - ID2P(LANG_REMOVE), ID2P(LANG_MOVE), + ID2P(LANG_REMOVE), ID2P(LANG_MOVE), ID2P(LANG_SHUFFLE), ID2P(LANG_SAVE_DYNAMIC_PLAYLIST)); bool current = (current_track->index == viewer.current_playing_track); @@ -507,6 +507,11 @@ static int onplay_menu(int index) ret = 0; break; case 4: + /* shuffle */ + playlist_randomise(viewer.playlist, current_tick, false); + ret = 1; + break; + case 5: /* save playlist */ save_playlist_screen(viewer.playlist); ret = 0;