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: basic playlist_loader (Read 4561 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

basic playlist_loader

class playlist_loader_spl_xspf : public playlist_loader {
   virtual void open(const char* p_path, const service_ptr_t<file>& p_file, playlist_loader_callback& p_callback) {
      pfc::list_t<metadb_handle_ptr> tracks;
      ...
   }
}

How should I return the playlist in the open() function knowing that the metadb_handle_ptr's of the playlist traks are in the variable tracks?

basic playlist_loader

Reply #1
By calling various methods of [font= "Courier New"]p_callback[/font] during processing.
Full-quoting makes you scroll past the same junk over and over.

basic playlist_loader

Reply #2
Hmm I think it is impossible to do what I want with the normal playlist_loader .

I want to load an xspf playlist, but it will only include track_title track_artist couples, so no paths to a filename. A pure soft playlist.
So I need access to the library. But I think that is not possble?

static_api_ptr_t<library_manager> lm;
lm->get_all_items(library);

This doesn't seem to work.

So is there a way around it, or will i have to make a special menu entry to load these type of playlists?

And if yes, is there a fucntion provided to display a file load dialog filtered by an extension?

basic playlist_loader

Reply #3
static_api_ptr_t<library_manager> lm;
lm->get_all_items(library);

This doesn't seem to work.
How specifically?

And if yes, is there a fucntion provided to display a file load dialog filtered by an extension?
[font= "Courier New"]uGetOpenFileName()[/font].
Full-quoting makes you scroll past the same junk over and over.


basic playlist_loader

Reply #5
Thanks for the info, I've made separate menu entries for what I'm trying to do.