IPB

Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

 
Reply to this topicStart new topic
basic playlist_loader
JohanDeBock
post Nov 27 2009, 02:58
Post #1





Group: Developer
Posts: 250
Joined: 23-March 05
Member No.: 20866



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?


--------------------
foo_softplaylists: http://tiny.cc/kh9m9
Go to the top of the page
+Quote Post
Yirkha
post Nov 27 2009, 10:17
Post #2





Group: FB2K Moderator
Posts: 2359
Joined: 30-November 07
Member No.: 49158



By calling various methods of p_callback during processing.


--------------------
Full-quoting makes you scroll past the same junk over and over.
Go to the top of the page
+Quote Post
JohanDeBock
post Nov 27 2009, 15:51
Post #3





Group: Developer
Posts: 250
Joined: 23-March 05
Member No.: 20866



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?


--------------------
foo_softplaylists: http://tiny.cc/kh9m9
Go to the top of the page
+Quote Post
Yirkha
post Nov 27 2009, 21:06
Post #4





Group: FB2K Moderator
Posts: 2359
Joined: 30-November 07
Member No.: 49158



QUOTE (JohanDeBock @ Nov 27 2009, 15:51) *
static_api_ptr_t<library_manager> lm;
lm->get_all_items(library);

This doesn't seem to work.
How specifically?

QUOTE (JohanDeBock @ Nov 27 2009, 15:51) *
And if yes, is there a fucntion provided to display a file load dialog filtered by an extension?
uGetOpenFileName().


--------------------
Full-quoting makes you scroll past the same junk over and over.
Go to the top of the page
+Quote Post
foosion
post Nov 27 2009, 21:11
Post #5





Group: FB2K Moderator (Donating)
Posts: 4336
Joined: 24-February 03
Member No.: 5153



From the SDK documentation for class library_manager:
QUOTE
All methods are valid from main thread only, unless noted otherwise.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
JohanDeBock
post Nov 27 2009, 22:02
Post #6





Group: Developer
Posts: 250
Joined: 23-March 05
Member No.: 20866



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


--------------------
foo_softplaylists: http://tiny.cc/kh9m9
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th April 2014 - 20:16