summaryrefslogtreecommitdiffstats
path: root/apps/onplay.c
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-02-15 23:38:14 +0100
committerSolomon Peachy <pizza@shaftnet.org>2021-02-17 11:33:25 +0000
commitabebc6b9acdbed87edd3bb40a9f76626a5180bc4 (patch)
tree594fb26eb2b41c3ac062af513ea588f86eb2f869 /apps/onplay.c
parent69746d840086c3e9e4499c3c19257cd981a9203a (diff)
downloadrockbox-abebc6b9ac.tar.gz
rockbox-abebc6b9ac.zip
Don’t erase a user’s stopped dynamic playlist when inserting/queuing songs
Rockbox would unexpectedly and without warning erase the current dynamic playlist (when it hadn’t finished playing) if the user inserted or queued up items while playback was stopped. This fix ensures that the playlist is only deleted if it has either finished playing or can't be resumed. Change-Id: I73b7bd56e6399f9be4bb000bae39c8b6a5e1b79b
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 5b22e72443..03470a279f 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -475,7 +475,7 @@ MAKE_ONPLAYMENU( wps_playlist_menu, ID2P(LANG_PLAYLIST),
/* CONTEXT_[TREE|ID3DB] playlist options */
static bool add_to_playlist(int position, bool queue)
{
- bool new_playlist = !(audio_status() & AUDIO_STATUS_PLAY);
+ bool new_playlist = !(audio_status() & AUDIO_STATUS_PLAY) && (global_status.resume_index == -1 || playlist_resume() == -1);
const char *lines[] = {
ID2P(LANG_RECURSE_DIRECTORY_QUESTION),
selected_file