![]() |
![]() |
![]() |
![]() |
Playlists can come from two sources:
This chapter describes how to work with playlists.
For information about synchronizing playlists, see “Synchronizing playlists” in the chapter Synchronizing Media.
The table below lists playlist formats supported by the MME:
Format | Extension |
---|---|
Advanced Stream Redirector | .asx |
iTunes XML; see “iTunes files” below. | .xml |
MP3 URL | .m3u |
RMP Playlist | .rmp |
PLS | .pls |
Windows Media Player Playlist | .wpl |
Windows Media Audio Metafile | .wax |
Windows Media Video Metafile | .wvx |
![]() |
Support for other playlist formats may be added in future releases, as required. |
During the file and folder discover synchronization pass, the MME adds, to the playlist table, entries for files whose extensions match supported playlist extensions listed under MME configuration file's <playlists> element. On the playlist synchronization pass, or if the client applications calls mme_playlist_sync(), the MME parses the contents of these files so that it can use the playlists as requested by the user.
For more information about playlist synchronization, see “Synchronizing playlists” in the chapter Synchronizing Media. For more information about the <playlists> configuration element, see “Filtering synchronization by file type”in the MME Configuration Guide chapter Configuring Media Synchronizations.
![]() |
If a playlist file is incorrectly labelled with the wrong extension, or the MME cannot parse the contents of the file, the MME will fail the playlist compilation pass. |
The MME does not support parsing of generic iTunes database files. To use an iTunes playlist, you must:
That is, the playlist file and the files it references must be on the same mediastore outside iTunes.
For example, if you want to have an iTunes playlist Someplaylist.xml, which includes Song1.mp3 and Song2.wav, you must copy Song1.mp3 and Song2.wav to E:/music or some other location outside iTunes, then create the playlist Someplaylist.xml at the same location.
The example below shows how to create a track session from a playlist. The MME synchronizes playlists in the playlist synchronization pass, and stores them in the playlists table. If we have a playlist called “My Playlist” that was built from a SELECT statement, we can:
// Run the SQL statement. qdb_statement(&db, "SELECT statement FROM playlists WHERE plid=%lld;", plid ) res = qdb_getresult( &db ); // Create a new track session from the result. mme_newtrksession( &mmehdl, (char*)qdb_cell(res, 0, 0), MME_PLAYMODE_LIBRARY, &trksid ); // Set the new track session as the active track session. mme_settrksession( &mmehdl, trksid ); // Start playing the track session from the beginning, // passing in a fid of 0 to start from the beginning. mme_play(&mmehdl, 0);
When it synchronizes playlists, the MME inserts in the playlistdata table a fid of 0 (zero) for any files that it cannot find. This action creates a record of files in a playlist that are not found, and causes the MME to check for the existence of these files when it performs subsequent resynchronizations.
If you build a track session using the playlistdata table, you should explicitly exclude files with a fid of 0 by adding the clause WHERE fid != 0 to track session queries made to the playlistdata table.
The MME supports multiple instances of the same file ID (fid) in a track session, so you can combine playlists with duplicate fids and have the MME play all the tracks in the combined playlists.
The MME includes functions that allow you to open and examine a playlist file. To open a playlist file and examine the contents of the playlist:
![]() |
|
Playlists are case-sensitive. Case-sensitivity applies to:
For example songs/my_playlist is not equivalent to songs/My_playlist. Similarly, in an M3U file songs/Dark Side of the Moon.mp3 is not equivalent to Songs/Dark Side of the moon.mp3.
The MME supports user-created playlists. Please note the following about user-created playlists:
Use the following functions to create and delete playlists:
To delete a playlist, call mme_playlist_delete().
![]() |
To following commands can be used with mmecli to use the user-created playlist functions:
|
![]() |
![]() |
![]() |
![]() |