I'm using foobar2000 0.9.2 Beta 4 and I'm trying to add a file to the active playlist and select it from a component. It works with help of the static_api_ptr_t<playlist_manager>()->activeplaylist_add_items() method, the file will be added and selected but here's the problem : "Follow the cursor" will not play it when the current song has ended, it plays the next song, not the selected one. If I add it manually it works normally.
So here's the question : What is the difference between manual add and select and the call from component ? Why won't foobar2000 "follow the cursor" ?
You need to set the the focus to your newly added item.
Thanks again, foosion, it works now using the call static_api_ptr_t<playlist_manager>()->playlist_set_focus_item(...) to focus the cursor on the newly added playlist item.