summaryrefslogtreecommitdiffstats
path: root/apps/playlist_viewer.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-09-17 09:29:19 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-09-17 09:29:19 +0000
commite03faf835dd7b879f589e3dc080991bab86dfae7 (patch)
tree2c916a836d5230128da3e03444d2b13eb2930556 /apps/playlist_viewer.c
parent66dce4b7304c976bd8dca27d934eaac9e6f4fdb9 (diff)
downloadrockbox-e03faf835dd7b879f589e3dc080991bab86dfae7.tar.gz
rockbox-e03faf835dd7b879f589e3dc080991bab86dfae7.tar.bz2
rockbox-e03faf835dd7b879f589e3dc080991bab86dfae7.zip
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
Diffstat (limited to 'apps/playlist_viewer.c')
-rw-r--r--apps/playlist_viewer.c7
1 files changed, 6 insertions, 1 deletions
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;