diff options
-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 | ||