From abebc6b9acdbed87edd3bb40a9f76626a5180bc4 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Mon, 15 Feb 2021 23:38:14 +0100 Subject: Don’t erase a user’s stopped dynamic playlist when inserting/queuing songs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apps/onplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3