summaryrefslogtreecommitdiffstats
path: root/apps/playlist_viewer.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-03-11 22:43:42 +0100
committerThomas Martitz <kugel@rockbox.org>2015-04-19 12:31:45 +0200
commitd5ead5c8fa64331bc64f4a85ef3582c87dcd2c7e (patch)
tree4079ca13e1ecd80938601a4d99d7590f8ed72cf7 /apps/playlist_viewer.c
parentea334cf650b31cda32066eef2c0541b02270ce98 (diff)
downloadrockbox-d5ead5c8fa64331bc64f4a85ef3582c87dcd2c7e.tar.gz
rockbox-d5ead5c8fa64331bc64f4a85ef3582c87dcd2c7e.tar.bz2
rockbox-d5ead5c8fa64331bc64f4a85ef3582c87dcd2c7e.zip
Don't shorten the playlist on shuffle. Fixes FS#13040
Change-Id: Ia482ac8248d831a5364ec7bf4d2ccb7b361d2f05
Diffstat (limited to 'apps/playlist_viewer.c')
-rw-r--r--apps/playlist_viewer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index d28643ab20..05b39b4a4e 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -475,8 +475,8 @@ static bool update_playlist(bool force)
}
/* Menu of playlist commands. Invoked via ON+PLAY on main viewer screen.
- Returns -1 if USB attached, 0 if no playlist change, and 1 if playlist
- changed. */
+ Returns -1 if USB attached, 0 if no playlist change, 1 if playlist
+ changed, 2 if a track was removed from the playlist */
static int onplay_menu(int index)
{
int result, ret = 0;
@@ -533,7 +533,7 @@ static int onplay_menu(int index)
}
}
}
- ret = 1;
+ ret = 2;
break;
case 3:
/* move track */
@@ -818,7 +818,8 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename)
else if (ret_val > 0)
{
/* Playlist changed */
- gui_synclist_del_item(&playlist_lists);
+ if (ret_val == 2)
+ gui_synclist_del_item(&playlist_lists);
update_playlist(true);
if (viewer.num_tracks <= 0)
exit = true;