From df3281347d1474d32d6b12349f736e90dab4f065 Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Tue, 21 Aug 2007 23:50:26 +0000 Subject: [PATCH] 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 --- apps/playlist_viewer.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 14cca7caf9..4f991cf9cf 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -574,17 +574,10 @@ bool playlist_viewer_ex(char* filename) while (!exit) { 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) gui_synclist_flash(&playlist_lists); - if (!viewer.playlist) + if (global_status.resume_index != -1 && !viewer.playlist) playlist_get_resume_info(&track); else track = -1; @@ -595,6 +588,9 @@ bool playlist_viewer_ex(char* filename) /* Playlist has changed (new track started?) */ if (!update_playlist(false)) 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); /* Abort move on playlist change */ viewer.move_track = -1;