Playlist service

getOwnPlaylists

PlaylistService.getOwnPlaylists()

Get a list of all playlist the currently logged in user has created.

getPlaylists

PlaylistService.getPlaylists()

Get a list of all playlist like the one on the portal page.

getTracks

PlaylistService.getTracks(String playlistId,
                          String sortOrder)

Get all tracks of a playlist. The playlist is specified by its ID. The sort order can be "Album" for sorting by album, "Artist" for sorting by artist or anything else (you should use NULL) for keeping the original playlist order. The playlist ID can be the ID of a playlist as returned by the previous functions or one of the special IDs "PlaylistAllByArtist" which returns all tracks sorted by artist, "PlaylistAllByAlbum" which returns all tracks sorted by album, "PlaylistRandom" which returns randomly selected tracks, "PlaylistMostPlayed" which returns the most played or "PlaylistLastUpdated" for the recentely updated tracks. Most playlist IDs can have additional information encoded in the ID. The "PlaylistMostPlayed" and "PlaylistLastUpdated" ID should have an additional underscore with followed by the maximum number to return, e.g. "PlaylistLastUpdated_100" to get the 100 recently updated tracks. The "PlaylistRandom" has the additional parameters "type" (which is any combination of the letters "a" for audio, "v" for video and "p" for protected and the numer of items. A third optional paramter is the ID of a real playlist which is used as the source for random tracks, i.e. only tracks of that playlist will be selected, e.g. "PlaylistRandom_av_50_SomePlaylistID" will select 50 random audio and video tracks (but no protected ones) from the playlist with the ID "SomePlaylistID". All regular playlist IDs can have optional values, too. These are separated by the "@" character. The first parameter is the first index and the second the last index of the tracks to select. So you can select only some of the tracks, e.g. for implementing pagers. For example "SomePlaylistId@100@199" will select track 100 to 199 (0 based) from the playlist with the ID "SomePlaylistId".