diff options
authorChristian Soffke <>2021-11-02 04:59:58 +0100
committerSolomon Peachy <>2021-11-03 13:28:10 -0400
commit22c2e0a7c2be5bdc4a8ca0662c561454f5fb623a (patch)
parent5e663f0420c97ef90a7d38f42d86ca2c6ea59752 (diff)
Fix: Reset onplay-context for playlist viewer
The onplay-context was previously not reset when using the playlist viewer, which led to a bug if onplay() was last called in the context of the database. If you then tried to insert songs into a dynamic playlist using the playlist viewer, a selected track from the database would be picked, instead of one from the displayed playlist, due to special behavior of add_to_playlist() within the database context. Change-Id: I727d96fc1bfb2454ed3535959c1b0044ff7d6359
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 83b24da78d..f8233da92c 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -778,6 +778,7 @@ static int treeplaylist_callback(int action,
void onplay_show_playlist_menu(char* path)
+ context = CONTEXT_STD;
selected_file = path;
if (dir_exists(path))
selected_file_attr = ATTR_DIRECTORY;
@@ -825,6 +826,7 @@ MAKE_ONPLAYMENU(cat_playlist_menu, ID2P(LANG_CATALOG),
void onplay_show_playlist_cat_menu(char* track_name)
+ context = CONTEXT_STD;
selected_file = track_name;
selected_file_attr = FILE_ATTR_AUDIO;
do_menu(&cat_playlist_menu, NULL, NULL, false);