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
This commit is contained in:
parent
5e663f0420
commit
22c2e0a7c2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue