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
This commit is contained in:
parent
5b5d1018d0
commit
3d44a20db7
1 changed files with 13 additions and 9 deletions
|
@ -274,11 +274,19 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer,
|
||||||
{
|
{
|
||||||
char* buffer;
|
char* buffer;
|
||||||
size_t buffer_size;
|
size_t buffer_size;
|
||||||
bool is_playing = audio_status() & AUDIO_STATUS_PLAY;
|
bool is_playing = audio_status() & (AUDIO_STATUS_PLAY | AUDIO_STATUS_PAUSE);
|
||||||
|
bool have_list = filename || is_playing;
|
||||||
if (!filename && !is_playing)
|
if (!have_list && (global_status.resume_index != -1))
|
||||||
/* Nothing is playing, exit */
|
{
|
||||||
|
/* Try to restore the list from control file */
|
||||||
|
have_list = (playlist_resume() != -1);
|
||||||
|
}
|
||||||
|
if (!have_list)
|
||||||
|
{
|
||||||
|
/* Nothing to view, exit */
|
||||||
|
gui_syncsplash(HZ, str(LANG_CATALOG_NO_PLAYLISTS));
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
buffer = plugin_get_buffer(&buffer_size);
|
buffer = plugin_get_buffer(&buffer_size);
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
|
@ -567,14 +575,10 @@ bool playlist_viewer_ex(char* filename)
|
||||||
while (!exit)
|
while (!exit)
|
||||||
{
|
{
|
||||||
int track;
|
int track;
|
||||||
if (!viewer.playlist && !(audio_status() & AUDIO_STATUS_PLAY))
|
if (global_status.resume_index == -1)
|
||||||
{
|
{
|
||||||
/* Play has stopped */
|
/* Play has stopped */
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
|
||||||
gui_syncsplash(HZ, str(LANG_END_PLAYLIST_PLAYER));
|
|
||||||
#else
|
|
||||||
gui_syncsplash(HZ, str(LANG_END_PLAYLIST_RECORDER));
|
gui_syncsplash(HZ, str(LANG_END_PLAYLIST_RECORDER));
|
||||||
#endif
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue