Accept FS #7626: allow viewing playlist files if no playlist is loaded

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14420 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Peter D'Hoye 2007-08-21 23:50:26 +00:00
parent 0d5451e7bd
commit df3281347d

View file

@ -574,17 +574,10 @@ bool playlist_viewer_ex(char* filename)
while (!exit) while (!exit)
{ {
int track; int track;
if (global_status.resume_index == -1)
{
/* Play has stopped */
gui_syncsplash(HZ, str(LANG_END_PLAYLIST));
goto exit;
}
if (viewer.move_track != -1) if (viewer.move_track != -1)
gui_synclist_flash(&playlist_lists); gui_synclist_flash(&playlist_lists);
if (!viewer.playlist) if (global_status.resume_index != -1 && !viewer.playlist)
playlist_get_resume_info(&track); playlist_get_resume_info(&track);
else else
track = -1; track = -1;
@ -595,6 +588,9 @@ bool playlist_viewer_ex(char* filename)
/* Playlist has changed (new track started?) */ /* Playlist has changed (new track started?) */
if (!update_playlist(false)) if (!update_playlist(false))
goto exit; goto exit;
/*Needed because update_playlist gives wrong value when
playing is stopped*/
viewer.current_playing_track = track;
gui_synclist_set_nb_items(&playlist_lists, viewer.num_tracks); gui_synclist_set_nb_items(&playlist_lists, viewer.num_tracks);
/* Abort move on playlist change */ /* Abort move on playlist change */
viewer.move_track = -1; viewer.move_track = -1;