SqueezePHPAPI
[ class tree: SqueezePHPAPI ] [ index: SqueezePHPAPI ] [ all elements ] [ doc index ]

Class: SqueezePlaylist

Source Location: /lib/class.SqueezePlaylist.php

Class Overview

SqueezePlaylist


Author(s):

Copyright:

Methods


 

Class Details

[line 27]
SqueezePlaylist

SqueezePlayer Playlist interface


Tags:

author:  David Broz <db-dev__AT__0r9.org>
copyright:  (c) 2009 by David Broz - Disorganization Zurich, Switzerland
license:  GNU General Public License v2


[ Top ]


Class Methods


constructor __construct [line 52]

SqueezePlaylist __construct( SqueezeConnection $CLI, string $playerid)

SqueezePlaylist (constructor)



Parameters:

SqueezeConnection   $CLI  
string   $playerid  

[ Top ]

destructor __destruct [line 564]

void __destruct( )

SqueezePlaylist (destructor)



[ Top ]

method add [line 81]

boolean add( [string $item = ""])

add

The "playlist add" command adds the specified song URL, playlist or directory contents to the end of the current playlist. Songs currently playing or already on the playlist are not affected.


Tags:

return:  (success)
access:  public


Parameters:

string   $item   <item>

[ Top ]

method addalbum [line 206]

boolean addalbum( [string $genre = ""], [string $artist = ""], [string $album = ""])

addalbum

The "playlist addalbum" command appends all songs matching the specified criteria onto the end of the playlist. Songs currently playing or already on the playlist are not affected.


Tags:

return:  (success)
access:  public


Parameters:

string   $genre   <genre>
string   $artist   <artist>
string   $album   <album>

[ Top ]

method addtracks [line 236]

boolean addtracks( [string $searchparam = ""])

addtracks

The "playlist addtracks" command appends all songs matching the specified criteria onto the end of the playlist. Songs currently playing or already on the playlist are not affected. Note: you must provide a particular form to the searchparam (see examples)


Tags:

return:  (success)
access:  public


Parameters:

string   $searchparam   <searchparam>

[ Top ]

method album [line 404]

string album( [integer $index = -1])

album

The "playlist album" returns the requested information for a given song at an index position in the current playlist.


Tags:

access:  public


Parameters:

integer   $index   <index>

[ Top ]

method artist [line 391]

string artist( [integer $index = -1])

artist

The "playlist artist" returns the requested information for a given song at an index position in the current playlist.


Tags:

access:  public


Parameters:

integer   $index   <index>

[ Top ]

method clear [line 282]

boolean clear( )

clear

The "playlist clear" command removes any song that is on the playlist. The player is stopped.


Tags:

return:  (success)
access:  public


[ Top ]

method delete [line 138]

boolean delete( [integer $songindex = -1])

delete

The "playlist delete" command deletes the song at the specified index from the current playlist.


Tags:

return:  (success)
access:  public


Parameters:

integer   $songindex   <songindex>

[ Top ]

method deletealbum [line 270]

boolean deletealbum( [string $genre = ""], [string $artist = ""], [string $album = ""])

deletealbum

The "playlist deletealbum" command removes songs matching the specified genre artist and album criteria from the playlist.


Tags:

return:  (success)
access:  public


Parameters:

string   $genre   <genre>
string   $artist   <artist>
string   $album   <album>

[ Top ]

method deleteitem [line 107]

boolean deleteitem( [string $item = ""])

deleteitem

The "playlist deleteitem" command removes the specified song URL, playlist or directory contents from the current playlist.


Tags:

return:  (success)
access:  public


Parameters:

string   $item   <item>

[ Top ]

method duration [line 456]

string duration( [integer $index = -1])

duration

The "playlist duration" returns the requested information for a given song at an index position in the current playlist.


Tags:

access:  public


Parameters:

integer   $index   <index>

[ Top ]

method genre [line 378]

string genre( [integer $index = -1])

genre

The "playlist genre" returns the requested information for a given song at an index position in the current playlist.


Tags:

access:  public


Parameters:

integer   $index   <index>

[ Top ]

method index [line 361]

mixed index( [string $index = "?"], [integer $fadeInSecs = -1])

index

The "playlist index" command sets or queries the song that is currently playing by index. When setting, a zero-based value may be used to indicate which song to play. An explicitly positive or negative number may be used to jump to a song relative to the currently playing song. If an index parameter is set then "fadeInSecs" may be passed to specify fade-in period. The value of the current song index may be obtained by passing in "?" as a parameter.


Tags:

return:  (integer on query) (boolean success)
access:  public


Parameters:

string   $index   <index|+index|-index|?>
integer   $fadeInSecs   <fadeInSecs>

[ Top ]

method insert [line 94]

boolean insert( [string $item = ""])

insert

The "playlist insert" command inserts the specified song URL, playlist or directory contents to be played immediately after the current song in the current playlist. Any songs currently playing or already on the playlist are not affected.


Tags:

return:  (success)
access:  public


Parameters:

string   $item   <item>

[ Top ]

method insertalbum [line 255]

boolean insertalbum( [string $genre = ""], [string $artist = ""], [string $album = ""])

insertalbum

The "playlist insertalbum" command inserts all songs matching the specified criteria at the top of the playlist. Songs already on the playlist are not affected.


Tags:

return:  (success)
access:  public


Parameters:

string   $genre   <genre>
string   $artist   <artist>
string   $album   <album>

[ Top ]

method loadalbum [line 191]

boolean loadalbum( [string $genre = ""], [string $artist = ""], [string $album = ""])

loadalbum

The "playlist loadalbum" command puts songs matching the specified genre artist and album criteria on the playlist. Songs previously in the playlist are discarded.


Tags:

return:  (success)
access:  public


Parameters:

string   $genre   <genre>
string   $artist   <artist>
string   $album   <album>

[ Top ]

method loadtracks [line 219]

boolean loadtracks( [string $searchparam = ""])

loadtracks

The "playlist loadtracks" command puts tracks matching the specified query on the playlist. Songs previously in the playlist are discarded. Note: you must provide a particular form to the searchparam (see examples)


Tags:

return:  (success)
access:  public


Parameters:

string   $searchparam   <searchparam>

[ Top ]

method modified [line 335]

string modified( )

modified

The "playlist modified" returns the modification state of the saved playlist last loaded into the Now Playing playlist, if any. If "1", the playlist has been modified since it was loaded.


Tags:

access:  public


[ Top ]

method move [line 121]

boolean move( [integer $fromindex = 0], [integer $toindex = 5])

move

The "playlist move" command moves the song at the specified index to a new index in the playlist. An offset of zero is the first song in the playlist.


Tags:

return:  (success)
access:  public


Parameters:

integer   $fromindex   <fromindex>
integer   $toindex   <toindex>

[ Top ]

method name [line 311]

string name( )

name

The "playlist name" command returns the name of the saved playlist last loaded into the Now Playing playlist, if any.


Tags:

access:  public


[ Top ]

method path [line 430]

string path( [integer $index = -1])

path

The "playlist path" returns the requested information for a given song at an index position in the current playlist.


Tags:

access:  public


Parameters:

integer   $index   <index>

[ Top ]

method play [line 68]

boolean play( [string $item = ""], [string $title = ""], [integer $fadeInSecs = -1])

play

The "playlist play" command puts the specified song URL, playlist or directory contents into the current playlist and plays starting at the first item.
Any songs previously in the playlist are discarded. An optional title value may be passed to set a title. This can be useful for remote URLs. The "fadeInSecs" parameter may be passed to specify fade-in period.


Tags:

return:  (success)
access:  public


Parameters:

string   $item   <item>
string   $title   <title>
integer   $fadeInSecs   <fadeInSecs>

[ Top ]

method playlistcontrol [line 549]

array playlistcontrol( [string $cmd = ""], [string $genre_id = ""], [string $artist_id = ""], [string $album_id = ""], [string $track_id = ""], [string $year = ""], [string $playlist_id = ""], [string $folder_id = ""], [string $playlist_name = ""])

playlistcontrol

The "playlistcontrol" command enables playlist operations using IDs as returned by extended CLI queries (titles, artists, playlists, etc).


Tags:

return:  <taggedParameters>
access:  public


Parameters:

string   $cmd   Command to perform on the playlist, one of "load", "add", "insert" or "delete". This parameter is mandatory. If no additional parameter is provided, the entire DB is loaded/added/inserted/deleted.
string   $genre_id   Genre ID, to restrict the results to the titles of that genre.
string   $artist_id   Artist ID, to restrict the results to the titles of that artist.
string   $album_id   Album ID, to restrict the results to the titles of that album.
string   $track_id   Comma-separated list of track IDs, to restrict the results to these track_ids. If this parameter is provided, then any genre_id, artist_id and/or album_id parameter is ignored. The tracks are added to the playlist in the given order.
string   $year   Year, to restrict the results to the given year.
string   $playlist_id   Playlist ID, to restrict the results to this playlist_id. If this parameter is provided, then any genre_id, artist_id, album_id and/or track_id parameter is ignored.
string   $folder_id   Folder ID, to restrict the results to files in this folder_id. If this parameter is provided, then any all the others are ignored. Note that "cmd:delete" is not supported for folders.
string   $playlist_name   Playlist name, to restrict the results to this playlist_name. If this parameter is provided, then any genre_id, artist_id, album_id, track_id and/or playlist_id parameter is ignored.

[ Top ]

method playlistsinfo [line 347]

array playlistsinfo( )

playlistsinfo

The "playlist playlistsinfo" query returns information on the saved playlist last loaded into the Now Playing playlist, if any.


Tags:

access:  public


[ Top ]

method remote [line 443]

string remote( [integer $index = -1])

remote

The "playlist remote" returns the requested information for a given song at an index position in the current playlist. "playlist remote" returns 1 if the "song" is a remote stream.


Tags:

access:  public


Parameters:

integer   $index   <index>

[ Top ]

method repeat [line 520]

boolean repeat( [string $state = ""])

repeat

The "playlist repeat" command is used to indicate or query if the player will stop playing at the end of the playlist, repeat the current song indefinitely, or repeat the current playlist indefinitely. A value of "0" indicates that the player will stop at the end of the playlist, "1" indicates that the player will repeat the current song indefinitely and a value of "2" indicates that the player will repeat the entire playlist indefinitely. Used with no parameter, the command toggles the repeat state.


Tags:

return:  (success)
access:  public


Parameters:

string   $state   <0|1|2|?|>

[ Top ]

method resume [line 155]

boolean resume( [string $playlist = ""])

resume

Replace the current playlist with the playlist specified by p2, starting at the song that was playing when the file was saved. (Resuming works only with M3U files saved with the "playlist save" command below.) Shortcut: use a bare playlist name (without leading directories or trailing .m3u suffix) to load a playlist in the saved playlists folder.


Tags:

return:  (success)
access:  public


Parameters:

string   $playlist   <playlist>

[ Top ]

method save [line 172]

boolean save( [string $filename = ""])

save

Saves a playlist file in the saved playlists directory. Accepts a playlist filename (without .m3u suffix) and saves in the top level of the playlists directory.


Tags:

return:  (success)
access:  public


Parameters:

string   $filename   <filename>

[ Top ]

method shuffle [line 499]

boolean shuffle( [string $state = ""])

shuffle

The "playlist shuffle" command is used to shuffle, unshuffle or query the shuffle state for the current playlist. A value of "0" indicates that the playlist is not shuffled, "1" indicates that the playlist is shuffled by song, and "2" indicates that the playlist is shuffled by album. Used with no parameter, the command toggles the shuffling state.


Tags:

return:  (success)
access:  public


Parameters:

string   $state   <0|1|2|?|>

[ Top ]

method title [line 417]

string title( [integer $index = -1])

title

The "playlist title" returns the requested information for a given song at an index position in the current playlist.


Tags:

access:  public


Parameters:

integer   $index   <index>

[ Top ]

method tracks [line 486]

integer tracks( )

tracks

The "playlist tracks" command returns the the total number of tracks in the current playlist


Tags:

access:  public


[ Top ]

method url [line 323]

string url( )

url

The "playlist url" command returns the URL of the saved playlist last loaded into the Now Playing playlist, if any.


Tags:

access:  public


[ Top ]

method zap [line 295]

boolean zap( [integer $songindex = -1])

zap

The "playlist zap" command adds the song at index songindex into the zapped song playlist.


Tags:

return:  (success)
access:  public


Parameters:

integer   $songindex   <songindex>

[ Top ]


Documentation generated on Wed, 16 Sep 2009 18:08:28 +0200 by phpDocumentor 1.4.2