Help - Search - Members - Calendar
Full Version: Playlist auto name
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
schokobon
Hello,

i dont know if im on the correct way but is auto_playlist_name() of playlist_incoming_item_filter_v3 supposed to be called
before the playlist gets its name?
maybe somebody could do a short example how to use it.

thx
Yirkha
playlist_incoming_item_filter_v3::auto_playlist_name() doesn't do anything with real playlists, it just tries to guess a nice name for all the items in the supplied list. For example, when all tracks are from one album, it's in form "%artist% - %album%", for tracks from various albums of one artist it's only "%artist%", etc. When no common attribute could be found, it returns false.
foosion
The playlist_incoming_item_filter service is implemented by the core. When you want to create a playlist with a given list of tracks, you can use the auto_playlist_name() method to let the core suggest a name for the playlist based on the contents of that playlist. The code to use it would be like this:
CODE
metadb_handle_list items = ...;
pfc::string8 name;
static_api_ptr_t<playlist_incoming_item_filter_v3> piif;
if (!piif->auto_playlist_name(items, name)) {
  // Use default name
  name = "New playlist";
}
// TODO: Create playlist.
schokobon
ohh ok i see i was totaly wrong thx for the info
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.