From 22c2e0a7c2be5bdc4a8ca0662c561454f5fb623a Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Tue, 2 Nov 2021 04:59:58 +0100 Subject: 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 --- apps/onplay.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit