- Types of Media Sources
- Sharing Media from Your PC
- NAS (Network Attached Storage)
- User Profiles
- The UserData Folder
- Special protocol
- RSS Feeds
- RSS feed Control
- Advanced Configuration
- Log file
- USB Mass Storage in Xbox
- Error Recovery Mode
- Import - Export Library
- XBMC's Inner Workings
- Development Notes
- Python Development
- Skinning XBMC
- List of Built In Functions
- Web Server HTTP API
- The XBMC Database
- Audio Players
- Video Players
- HOW-TO write Media Scrapers
- Regular Expression Tutorial
- Point Releases
- HOW-TO's / Tips & Tricks
- Mods to XBMC and Xbox
A Playlist is a normal text file that lists one or more media files (Audio or Video), and plays them in succession. You can either create your own or use existing playlists from other sources, e.g. Winamp M3U playlists.
Playlists are by default stored in subfolders of the Playlists folder in The UserData Folder. Playlists can be run from anywhere, but the music and video library playlist nodes look in the following folders:
- mixed - playlists containing both audio and music videos, will show in both the Music and Video Libraries.
- music - playlists containing audio only, will show in the Music Library.
- video - playlists containing videos only, will show in the Video Library.
Working with Playlists
There are two basic ways to create and manipulate playlists in XBMC.
To see the currently playing playlist bring up the context menu. The currently playing playlist is accessible via the Now Playing item. If the playlist is currently empty, that option will not be visible in the context menu.
You can add songs or entire folders with the "Queue" action of your control device. Alternatively, the "Queue Item" option in the context menu can be used.
While in the "Now Playing" window and pressing the Select or the Play button will start playback of your playlist.
Once in The Playlists view, you can save your playlist. Playlists are by default saved in a subfolder of $HOME\UserData\playlists (separate folder for music, video and mixed playlists).
Playlists on Remote Computers
If you use playlists to play files on a remote computer, make sure the contents of the playlist file match the file structure relative to XBMC.---(ie, if your using samba, you'll need to use smb://fullpath/file.mp3).
Example: You want to play several files located in C:\music\mp3\ on your PC with XBMC.
"C:\music\mp3s\" is shared out as mp3 on your PC using PC file sharing
For that to work each item in your playlist file must be formatted thus:
Alternatively, there are settings in advancedsettings.xml for path substitutions in playlists. For instance, by adding
<pathsubstitution> <substitute> <from>C:\music\mp3s\</from> <to>smb://workgroup;someuser:somepass@computer/mp3/</to> </substitute> </pathsubstitution>
You could use the same playlist file on your PC and XBMC. That is, anywhere the path c:\music\mp3s\ is found in a playlist, XBMC would substitute smb://workgroup;someuser:somepass@computer/mp3/
Cue Sheet, or a "cue" file, is a metadata file which describes how the tracks of a AudioCD or AudioDVD are laid out. Cue sheets are stored as plain text files and commonly have a ".cue" filename extension. CDRWIN first introduced cue sheets, which are now supported by many optical disc authoring applications and media players, including XBMC Media Center.
For an AudioCD, a cue sheet specifies titles and performers for the disc and its tracks as well as the names of one or more audio files to be used. MP3, AAC, FLAC, WAV, and DTS files are often used, although any audio formats is really supported. Cue sheets are especially useful when burning or listening to live sets where all tracks are recorded in one single file.
Party Mode Playlists
The Party Mode music and music video playlists are the only predefined playlists in XBMC. They can be further configured via the partyMode.xsp and partymode-video.xsp files in The UserData Folder. The Party Mode playlists are smart playlists and can be configured as seen below.
XBMC now supports "Smart" playlists for all types of media, which essentially use a set of rules to limit the results from the databases.
Smart playlists can be created either by using the built-in GUI Smart Playlist Editor accessible from the Playlist section, or by creating an xml file with the extension .xsp (XBMC Smart Playlist).
Format of a Smart Playlist File
Smart playlists are plain text files that can be parsed by an xml reader. Any text editor can be used to create them.
<smartplaylist type="music"> <name>All U2 from after 1990</name> <match>all</match> <rule field="artist" operator="is">U2</rule> <rule field="year" operator="greaterthan">1990</rule> <limit>50</limit> <order direction="descending">playcount</order> </smartplaylist>
Smart playlists can be of type music, video or mixed. If the type tag is left out, XBMC assumes music.
The <rule> tags, of which there can be as many as you wish, have 2 attributes (field and operator) and a value (the parameter). The allowed fields are:
The operator attribute specifies the rule that should be used to match the parameter to the field. All matching is done case-insensitive. The allowed operators are
The <limit> tag simply takes a number of songs as it's limit. A missing limit tag, or <limit>0</limit> will retrieve all matching songs. The <order> tag has a direction attribute, the values of which can be "ascending" or "descending", and it's value is a field as above, or can be <order>random</order> if you want a random ordering returned. Note that random should be used with care - it is quite slow if the returned results from the <rule> sets is large (> 500 items).
The above example, therefore selects all songs whose artist field is U2 and whose year field is greater than 1990, orders them by the number of times they've been played (most played first) then limits it to just 50. Thus, the top 50 songs you've played from all U2 songs published after 1990.
Smart playlists should be placed in your $HOME\UserData\playlists\music folder on the xbox harddisk. They cannot be read off of remote shares at present.
Smart Playlist Examples
Recently played songs
<smartplaylist type="music"> <name>Recently Played Songs</name> <match>all</match> <rule field="lastplayed" operator="inthelast">2 weeks</rule> <order direction="descending">lastplayed</order> </smartplaylist>
Top 100 songs
<smartplaylist type="music"> <name>Top 100 Songs</name> <match>all</match> <rule field="playcount" operator="greaterthan">0</rule> <order direction="descending">playcount</order> <limit>100</limit> </smartplaylist>
Rock music from the 1970s
<smartplaylist type="music"> <name>Rock Music from the 1970s</name> <match>all</match> <rule field="genre" operator="is">Rock</rule> <rule field="year" operator="greaterthan">1969</rule> <rule field="year" operator="lessthan">1980</rule> </smartplaylist>
The "playlist" field can be used to combine several playlists together. When playlists are combined, the <limit> and <order> tags of the included playlists are ignored; only the <order> and <limit> of the final playlist are used.
As a simple example, lets create a new playlist combining the "Rock Music from the 1970s" and "Recently Played Songs" playlists above, to produce a playlist with the recently played rock songs from the 1970s.
Recently played rock tracks from the 1970s
<smartplaylist type="music"> <name>Recently played Rock Tracks from the 1970s</name> <match>all</match> <rule field="playlist" operator="is">Rock Music from the 1970s</rule> <rule field="playlist" operator="is">Recently Played Songs</rule> </smartplaylist>
Using this system allows very complex queries to be built. Note that in a single playlist, you can only match ALL of the rules, or ONE (or more) of the rules. This is basically either ANDing the conditions together, or ORing them together. You cannot mix AND with OR in a single playlist. To build up a playlist with both AND and OR operations on the rules, you use multiple playlists to group the AND operations and the OR operations, then combine them as above.