diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2021-11-02 04:59:58 +0100 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-11-03 13:28:10 -0400 |
commit | 22c2e0a7c2be5bdc4a8ca0662c561454f5fb623a (patch) | |
tree | 1fdfbaf813ae4e0d9db304c5a9ea097bc9140492 /apps | |
parent | 5e663f0420c97ef90a7d38f42d86ca2c6ea59752 (diff) | |
download | rockbox-22c2e0a7c2be5bdc4a8ca0662c561454f5fb623a.tar.gz rockbox-22c2e0a7c2be5bdc4a8ca0662c561454f5fb623a.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/onplay.c | 2 |
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, | |||
778 | 778 | ||
779 | void onplay_show_playlist_menu(char* path) | 779 | void onplay_show_playlist_menu(char* path) |
780 | { | 780 | { |
781 | context = CONTEXT_STD; | ||
781 | selected_file = path; | 782 | selected_file = path; |
782 | if (dir_exists(path)) | 783 | if (dir_exists(path)) |
783 | selected_file_attr = ATTR_DIRECTORY; | 784 | selected_file_attr = ATTR_DIRECTORY; |
@@ -825,6 +826,7 @@ MAKE_ONPLAYMENU(cat_playlist_menu, ID2P(LANG_CATALOG), | |||
825 | 826 | ||
826 | void onplay_show_playlist_cat_menu(char* track_name) | 827 | void onplay_show_playlist_cat_menu(char* track_name) |
827 | { | 828 | { |
829 | context = CONTEXT_STD; | ||
828 | selected_file = track_name; | 830 | selected_file = track_name; |
829 | selected_file_attr = FILE_ATTR_AUDIO; | 831 | selected_file_attr = FILE_ATTR_AUDIO; |
830 | do_menu(&cat_playlist_menu, NULL, NULL, false); | 832 | do_menu(&cat_playlist_menu, NULL, NULL, false); |