Fix playlist viewer behaviour when deleting tracks (one ret had missed being changed to ret_val). FIx playlist viewer behaviour when deleting the only remaining track in playlist (i.e. when audio stops, prevent resume playback also)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21615 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bff790d692
commit
4044499198
1 changed files with 9 additions and 1 deletions
|
@ -418,10 +418,18 @@ static bool update_playlist(bool force)
|
||||||
/* Reload tracks */
|
/* Reload tracks */
|
||||||
viewer.num_tracks = nb_tracks;
|
viewer.num_tracks = nb_tracks;
|
||||||
if (viewer.num_tracks <= 0)
|
if (viewer.num_tracks <= 0)
|
||||||
|
{
|
||||||
|
global_status.resume_index = -1;
|
||||||
|
global_status.resume_offset = -1;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
playlist_buffer_load_entries_screen(&viewer.buffer, FORWARD);
|
playlist_buffer_load_entries_screen(&viewer.buffer, FORWARD);
|
||||||
if (viewer.buffer.num_loaded <= 0)
|
if (viewer.buffer.num_loaded <= 0)
|
||||||
|
{
|
||||||
|
global_status.resume_index = -1;
|
||||||
|
global_status.resume_offset = -1;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -716,7 +724,7 @@ bool playlist_viewer_ex(const char* filename)
|
||||||
ret = true;
|
ret = true;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
else if (ret > 0)
|
else if (ret_val > 0)
|
||||||
{
|
{
|
||||||
/* Playlist changed */
|
/* Playlist changed */
|
||||||
gui_synclist_del_item(&playlist_lists);
|
gui_synclist_del_item(&playlist_lists);
|
||||||
|
|
Loading…
Reference in a new issue