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: how to call playlist/remove dead entries (Read 3261 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

how to call playlist/remove dead entries

yo... i am the author of foo_Delete, and instead of writing my own remove dead entries from playlist code i wondered if there is a way to just call the builtin function. it would save me some work. right now my latest version only removes the 1st copy of a song from the playlist when you delete it and i'd rather not reinvent the wheel. since it would take some reinventing.

peace

evan

how to call playlist/remove dead entries

Reply #1
The easiest way is to use standard_commands (see menu_manager.h in the SDK). To execute the "Playlist/Remove dead entries" command, you would use
Code: [Select]
standard_commands::main_remove_dead_entries();

how to call playlist/remove dead entries

Reply #2
cool.

3rd part plugins site is down btw.

how to call playlist/remove dead entries

Reply #3
I'm trying to create a plugin that receives http commands to control fb2k and I can't get the playlist_oper::get()->remove_all(); to clear the playlist and after readin the lasts posts I tried standard_commands::main_clear_playlist();  but neiters for me... I'm using fb2k 0.8.2...  Others playlist operations are ok like:playlist_oper::get()->get_count();

The other one that is not working is  playlist_oper::get()->add_location(url);  Any help will be greatly appreciated!  TIA

how to call playlist/remove dead entries

Reply #4
Where are you calling these methods? The playlist engine is single-threaded, so if you're calling playlist_oper methods from somewhere other than the main thread you will see problems. The solution (AFAIK) is to create a window from the main thread and use PostMessage() from your socket thread to signal the window to carry out whatever actions need to be done.

Oh, and welcome to HA

how to call playlist/remove dead entries

Reply #5
Thanks Phi... I'll try that and see what happen!