Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: columns_ui playlist display (Read 3286 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

columns_ui playlist display

I have a setup where I have different layouts for different playlist types, i.e. Browser, Playing, Radio, Search, and Saved. This configuration requires that I be able to specify the playlist displayed in the particular playlist view (columns_ui, or single_columns_playlist) I use in the layout. The columns_ui playlist does not allow you to do that. I am confused as to what playlist columns_ui finds to display. I added the following code to a custom context menu item to make sure, when switching views, the "Now Playing" (which is the name of the playlist I use for currently playing songs) is active and playing when I switch to it's layout view. But, columns_ui still displays the Browser playlist.

In the following code "Now Playing" is the playlist for the currently playing songs, and "playing" is the layout name.

Code: [Select]
static_api_ptr_t<playlist_manager> pm;
pfc::string8 playlist("Now Playing");
t_size play_ndx = pm->find_playlist(playlist, playlist.length());
pm->set_active_playlist(play_ndx);
    
GUID guid;
pfc::string8 layout("playing");
mainmenu_commands::g_find_by_name(layout, guid);
standard_commands sc;
sc.run_main(guid);


I have output debug info that shows that before this function is called:
active playlist = Browser
playing playlist = Now Playing

Before calling sc.run_main(guid):
active playlist = Now Playing
playing playlist = Now Playing

After calling sc.run_main(guid):
active playlist = Browser
playing playlist = Now Playing

I have tried this under many scenarios, and it seems that in all cases the "playing playlist" is never altered but every time the columns_ui playlist layout is activated the "active playlist" is switched to the Browser (which has index 0). This is a problem for me, is this "as designed" or something that needs to be fixed?