diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-04-26 08:21:29 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-04-26 08:21:29 +0000 |
commit | 3d44a20db7c9537deeaa964bd532ba342ddb4727 (patch) | |
tree | 61dd31e9b1a1d37b9171474ef3c7807a21ec0884 /apps | |
parent | 5b5d1018d065e6fd44dca73d2a5e6f2eaf7850a8 (diff) | |
download | rockbox-3d44a20db7c9537deeaa964bd532ba342ddb4727.tar.gz rockbox-3d44a20db7c9537deeaa964bd532ba342ddb4727.zip |
Accept FS7078, try to show the last playlist if no audio is being played
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13268 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playlist_viewer.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 8a6fe73cba..b5cfe2a580 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c | |||
@@ -274,11 +274,19 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer, | |||
274 | { | 274 | { |
275 | char* buffer; | 275 | char* buffer; |
276 | size_t buffer_size; | 276 | size_t buffer_size; |
277 | bool is_playing = audio_status() & AUDIO_STATUS_PLAY; | 277 | bool is_playing = audio_status() & (AUDIO_STATUS_PLAY | AUDIO_STATUS_PAUSE); |
278 | 278 | bool have_list = filename || is_playing; | |
279 | if (!filename && !is_playing) | 279 | if (!have_list && (global_status.resume_index != -1)) |
280 | /* Nothing is playing, exit */ | 280 | { |
281 | /* Try to restore the list from control file */ | ||
282 | have_list = (playlist_resume() != -1); | ||
283 | } | ||
284 | if (!have_list) | ||
285 | { | ||
286 | /* Nothing to view, exit */ | ||
287 | gui_syncsplash(HZ, str(LANG_CATALOG_NO_PLAYLISTS)); | ||
281 | return false; | 288 | return false; |
289 | } | ||
282 | 290 | ||
283 | buffer = plugin_get_buffer(&buffer_size); | 291 | buffer = plugin_get_buffer(&buffer_size); |
284 | if (!buffer) | 292 | if (!buffer) |
@@ -567,14 +575,10 @@ bool playlist_viewer_ex(char* filename) | |||
567 | while (!exit) | 575 | while (!exit) |
568 | { | 576 | { |
569 | int track; | 577 | int track; |
570 | if (!viewer.playlist && !(audio_status() & AUDIO_STATUS_PLAY)) | 578 | if (global_status.resume_index == -1) |
571 | { | 579 | { |
572 | /* Play has stopped */ | 580 | /* Play has stopped */ |
573 | #ifdef HAVE_LCD_CHARCELLS | ||
574 | gui_syncsplash(HZ, str(LANG_END_PLAYLIST_PLAYER)); | ||
575 | #else | ||
576 | gui_syncsplash(HZ, str(LANG_END_PLAYLIST_RECORDER)); | 581 | gui_syncsplash(HZ, str(LANG_END_PLAYLIST_RECORDER)); |
577 | #endif | ||
578 | goto exit; | 582 | goto exit; |
579 | } | 583 | } |
580 | 584 | ||