[% pageicon = 'help' %] [% pagetitle = 'Command Line Interface' %] [% techinfo = '1' %] [% PROCESS helpheader.html %]
The SlimServer provides a command-line interface to the Slim Devices players via standard in and out and a TCP/IP port. After starting the server, commands and queries may be sent by connecting to a specific TCP/IP port or directly from the command line. The server will reply echoing the request (for commands) or by returning the requested data (for queries). By default, the SlimServer will listen for connections on TCP/IP port 9090. This format is designed for ease of integration into AMX, Crestron and other automation systems.
The end of line separator is line feed (<LF> ASCII decimal 10, hexadecimal 0x0A). The server accepts LF or CRLF as end of line, but always terminates replies with LF.
To use the command line interface interactively, use the telnet command from your system's command prompt: telnet localhost 9090 and when it connects, you can start typing commands.
The format of the commands, queries and server replies is as follows:
[<playerid>] <p0> <p1> ... <pN> <LF>
where:
<playerid>
is the unique identifier for the player, usually (but not guaranteed to be) the MAC address of the player. Some commands are global to the SlimServer and do not require a<playerid>
. For commands requiring it, a random player will be selected by the SlimServer if the<playerid><
is omitted, and returned in the server reply.<playerid>
may be obtained by using the "player id" or "players" command.
<p0>
through<pN>
are positional parameters. Pass a "?" to obtain a value for that parameter in the SlimServer response (i.e. send a query). Details of the parameters vary for each command as described below.
Each parameter needs to be encoded using percent-style escaping, the same method as is used in URLs; for example,
"The Clash?" would be encoded as "The%20Clash%3F". This also applies to <playerid>
.
In the examples below, the escaping is not show for readability (except %20 for space).
A few extended commands are defined, to regroup multiple queries and allow browsing the SlimServer database. These queries return multiple items. Overall however, their format is compliant with the general command format above:
[<playerid>] <command> <start> <itemsPerResponse> <p3> ... <pN> <LF>
where:
<playerid>
is the unique identifier for the player, as above.
<command>
is the command name, currently one of "players", "genres", "artists", "albums", "titles", "playlists", "songinfo" or "status".
<start>
and<itemsPerResponse>
are positional parameters that control the response chunking.<start>
is a zero-based index of the first item to return, and<itemsPerResponse>
is the number of items to return, if possible.
<p3>
through<pN>
are tagged parameters. Tags consist of a name followed by ":". For example, "artist:Abba". The tag and the ":" are URL escaped with the field value. Tag names cannot contain ":" but the data can.
to which the server replies:
[<playerid>] <command> <start> <itemsPerResponse> <p3> ... <pN> <pN+1> ... <pM> <LF>
where:
The entire query is repeated.
<pN+1>
through<pM>
is the tagged returned data. A special tag value is defined in each command to separate the multiple returned items. Data is only returned when applicable, that is, all possible tags are not always returned.
Example: The "players" command returns data on all players known by the server. It is a shortcut call compared to the general CLI API "player count ?" followed by a number of calls to get the players name, ID, etc. The command must be called with the chunking parameters. For example, the following returns information on the first 10 players known by the server (if so many exist), starting from the first one:
Request: "players 0 2<LF>"
Response: "players 0 2 count:2 playerindex:0 playerid:a5:41:d2:cd:cd:05 ip:127.0.0.1:60488 name:127.0.0.1 model:softsqueeze displaytype:graphic-280x16 connected:1 playerindex:1 playerid:00:04:20:02:00:c8 ip:192.168.1.22:3483 name:Movy model:slimp3 displaytype:noritake-katakana connected:1<LF>"
<item>
parameters below) can use
relative paths from the root of the Music Library folder to specify songs. For example, if the Music Library is
specified as "D:\mymusic" and you'd like to refer to a song in that folder named "foo.mp3" you
can specify just "foo.mp3" in the command parameter. Likewise, to refer to items in the Saved Playlist folder,
you can use a prefix of "__playlists/" before the path. For example, to refer to the saved playlist
"bar.m3u" in the Saved Playlists folder, you can specify a path of "__playlists/bar.m3u".
http://<server>:<port>/music/<path>/cover.jpg
http://<server>:<port>/music/<path>/thumb.jpg
where:
<server>
is the ip address or name of the server.
<port>
is the HTTP port of the server (not the same as the CLI port).
<path>
is the song path as returned by the CLI functions.
Request: "04:20:00:12:23:45 mixer bass ? context<LF>"
Response: "04:20:00:12:23:45 mixer bass 98 context<LF>"Request: "players 0 2 context:1<LF>"
Response: "players 0 2 context:1 count:2 id:00:04:20:02:00:c8 ...(same as above)"
The supported commands are listed below, grouped by their scope:
debug <debugflag> <0|1|?|>
The "debug" command allows the caller to query, clear, set or toggle the SlimServer's internal debug flags. Use 0 to clear, 1 to set, ? to query and no parameter to toggle the debug flag value.
Examples:
Request: "debug d_files ?<LF>"
Response: "debug d_files 0<LF>"Request: "debug d_itunes 0<LF>"
Response: "debug d_itunes 0<LF>"Request: "debug d_stream 1<LF>"
Response: "debug d_stream 1<LF>"Request: "debug d_stream<LF>"
Response: "debug d_stream 0<LF>"
listen <0|1|>
The "listen" command tells the server to send command events to the command-line client for all activity in the SlimServer, not just the activity triggered by the command line. This is useful for monitoring user activity from the remote control or web interface. Use 0 to clear, 1 to set, and no parameter to toggle the listen state of the command-line connection.
Examples:
Request: "listen 1<LF>"
Response:
listen 1<LF>
04:20:00:12:23:45 mixer volume 25<LF>
04:20:00:12:23:45 pause<LF>
...
pref <prefname> <prefvalue|?>
The "pref" command allows the caller to set and query the SlimServer's internal preferences values.
Examples:
Request: "pref audiodir ?<LF>"
Response: "pref audiodir %2fUsers%2fdean%2fDesktop%2ftest%20music<LF>"Request: "pref playlistdir %2fUsers%2fdean%2fplaylists<LF>"
Response: "pref playlistdir %2fUsers%2fdean%2fplaylists<LF>"
exit
The "exit" command closes the TCP connection with the server.
Examples:
Request: "exit<LF>"
Response: "exit<LF>"
(Connection terminated)
player count ?
The "player count" command returns the number of players defined in the system.
Request: "player count ?<LF>"
Response: "player count 2<LF>"
player id <playerindex|playerid> ?
The "player id" command returns the player's unique MAC address. This value is used when specifying a player in subsequent commands.
Request: "player id 0 ?<LF>"
Response: "player id 0 04:20:00:12:23:45<LF>"
player name <playerindex|playerid> ?
The "player name" command returns the human-readable name for the specified player. If the name has not been specified by the user in the Player Settings, then a default name will be used, usually the IP address.
Request: "player name 0 ?<LF>"
Response: "player name 0 Living Room<LF>"
player ip <playerindex|playerid> ?
The "player ip" command returns the IP address (along with port number) of the specified player. Note that the IP address and or port may change if the player reconnects or is rebooted. Use the playerid to uniquely identify the player.
Request: "player ip 0 ?<LF>"
Response: "player ip 0 192.168.1.22:3483<LF>"
player model <playerindex|playerid> ?
The "player model" command returns the model of the player, currently one of "squeezebox", "slimp3" or "softsqueeze".
Request: "player model 0 ?<LF>"
Response: "player model squeezebox<LF>"
player displaytype <playerindex|playerid> ?
The "player displaytype" command returns the display model of the player. Graphical display types start with "graphic-", non-graphical display type with "noritake-".
Request: "player displaytype 0 ?<LF>"
Response: "player displaytype 0 noritake-katakana<LF>"
<playerid> sleep <number|?>
The "sleep" command specifies a number of seconds to continue playing before powering off the player. You may query the amount of time until the player sleeps by passing in a "?" parameter.
Examples:
Request: "04:20:00:12:23:45 sleep ?<LF>"
Response: "04:20:00:12:23:45 sleep 105.3<LF>"Request: "04:20:00:12:23:45 sleep 300<LF>"
Response: "04:20:00:12:23:45 sleep 300<LF>"
<playerid> sync <playerindex|playerid|-|?>
The "sync" command specifies the player to synchronise with the given playerid. You may query which players are already synced with this player by passing in a "?" parameter. Multiple playerids are separated by a space. To unsync a player, use the - parameter.
Examples:
Request: "04:20:00:12:23:45 sync 1<LF>"
Response: "04:20:00:12:23:45 sync 1<LF>"Request: "04:20:00:12:23:45 sync ?<LF>"
Response: "04:20:00:12:23:45 sync 04:20:00:12:23:21<LF>"Request: "04:20:00:12:23:45 sync -<LF>"
Response: "04:20:00:12:23:45 sync -<LF>"
<playerid> power <0|1|?|>
The "power" command turns the player on or off. Use 0 to turn off, 1 to turn on, ? to query and no parameter to toggle the power state of the player.
Examples:
Request: "04:20:00:12:23:45 power 1<LF>"
Response: "04:20:00:12:23:45 power 1<LF>"Request: "04:20:00:12:23:45 power ?<LF>"
Response: "04:20:00:12:23:45 power 1<LF>"
<playerid> signalstrength ?
Returns the wireless signal strength for the player, range is 1 to 100. Returns 0 if not connected wirelessly.
Examples:
Request: "04:20:00:12:23:45 signalstrength ?<LF>"
Response: "04:20:00:12:23:45 signalstrength 76<LF>"
<playerid> connected ?
Return the connected state of the player. HTTP and Squeezebox players will indicate 1 or 0 depending on if the TCP connection to the player is active. SLIMP3 players, since they use UDP, always return 1.
Examples:
Request: "04:20:00:12:23:45 connected ?<LF>"
Response: "04:20:00:12:23:45 connected 1<LF>"
<playerid> mixer volume <0 .. 100|-100 .. +100|?>
The "mixer volume" command returns or sets the current volume setting for the player.
Example:
Request: "04:20:00:12:23:45 mixer volume ?<LF>"
Response: "04:20:00:12:23:45 mixer volume 98<LF>"Request: "04:20:00:12:23:45 mixer volume 25<LF>"
Response: "04:20:00:12:23:45 mixer volume 25<LF>"Request: "04:20:00:12:23:45 mixer volume +10<LF>"
Response: "04:20:00:12:23:45 mixer volume +10<LF>"
<playerid> mixer muting
The "mixer muting" command mutes or unmutes the player.
Example:
Request: "04:20:00:12:23:45 mixer muting<LF>"
Response: "04:20:00:12:23:45 mixer muting<LF>"
<playerid> mixer bass <0 .. 100|-100 .. +100|?>
The "mixer bass" command returns or sets the current bass setting for the player.
Example:
Request: "04:20:00:12:23:45 mixer bass ?<LF>"
Response: "04:20:00:12:23:45 mixer bass 98<LF>"Request: "04:20:00:12:23:45 mixer bass 25<LF>"
Response: "04:20:00:12:23:45 mixer bass 25<LF>"Request: "04:20:00:12:23:45 mixer bass +10<LF>"
Response: "04:20:00:12:23:45 mixer bass +10<LF>"
<playerid> mixer treble <0 .. 100|-100 .. +100|?>
The "mixer treble" command returns or sets the current treble setting for the player.
Example:
Request: "04:20:00:12:23:45 mixer treble ?<LF>"
Response: "04:20:00:12:23:45 mixer treble 98<LF>"Request: "04:20:00:12:23:45 mixer treble 25<LF>"
Response: "04:20:00:12:23:45 mixer treble 25<LF>"Request: "04:20:00:12:23:45 mixer treble +10<LF>"
Response: "04:20:00:12:23:45 mixer treble +10<LF>"
<playerid> mixer pitch <80 .. 120|-40 .. +40|?>
The "mixer pitch" command returns or sets the current pitch setting for the player (only supported by Squeezebox players).
Example:
Request: "04:20:00:12:23:45 mixer pitch ?<LF>"
Response: "04:20:00:12:23:45 mixer pitch 98<LF>"Request: "04:20:00:12:23:45 mixer pitch 80<LF>"
Response: "04:20:00:12:23:45 mixer pitch 80<LF>"Request: "04:20:00:12:23:45 mixer pitch +10<LF>"
Response: "04:20:00:12:23:45 mixer pitch +10<LF>"
<playerid> rate <rate|?>
The "rate" command returns or sets the current play rate for the player.
Example:
Request: "04:20:00:12:23:45 rate ?<LF>"
Response: "04:20:00:12:23:45 rate 1<LF>"Request: "04:20:00:12:23:45 rate -4<LF>"
Response: "04:20:00:12:23:45 rate -4<LF>"
<playerid> display <line1> <line2> <duration>
The "display" command specifies some text to be displayed on the player screen for a specified amount of time (in seconds).
Examples:
Request: "04:20:00:12:23:45 display Hello World 5<LF>"
Response: "04:20:00:12:23:45 display Hello World 5<LF>"
<playerid> linesperscreen ?
The "linesperscreen" command returns how many lines of text can fit in the display, depending on its current setting or font.
Examples:
Request: "04:20:00:12:23:45 linesperscreen ?<LF>"
Response: "04:20:00:12:23:45 linesperscreen 1<LF>"
<playerid> display ? ?
The "display ? ?" command may be used to obtain the text that is currently displayed on the screen.
Examples:
Request: "04:20:00:12:23:45 display ? ?<LF>"
Response: "04:20:00:12:23:45 display Hello World<LF>"
<playerid> displaynow ? ?
The "displaynow" command provides access to the data currently on the display. This differs from the "display ? ?" command in that it returns the latest data sent to the display, including any animation, double-size fonts, etc...
Examples:
Request: "04:20:00:12:23:45 displaynow ? ?<LF>"
Response: "04:20:00:12:23:45 display Hello World<LF>"
<playerid> playerpref <prefname> <prefvalue|?>
The "playerpref" command allows the caller to set and query the SlimServer's internal player-specific preferences values.
Examples:
Request: "04:20:00:12:23:45 playerpref doublesize ?"
Response: "04:20:00:12:23:45 playerpref doublesize 1"Request: "04:20:00:12:23:45 playerpref doublesize 0"
Response: "04:20:00:12:23:45 playerpref doublesize 0"
<playerid> button <buttoncode>
The "button" command simulates a button press. Valid button codes correspond to the functions defined in the Default.map file.
Example:
Request: "04:20:00:12:23:45 button stop<LF>"
Response: "04:20:00:12:23:45 button stop<LF>"
<playerid> ir <ircode> <time>
The "ir" command simulates an IR code. Valid IR codes are defined in the Default.map file.
Example:
Request: "bd:a5:a9:9b:9d:df ir 768910ef 11073.575<LF>"
Response: "bd:a5:a9:9b:9d:df ir 768910ef 11073.575<LF>"
players <start> <itemsPerResponse>
The "players" command returns information about all players known by the SlimServer.
Returned tagged parameters:
Tag | Description |
count | Number of players known by SlimServer. Equivalent to "player count ?". |
For each player: | |
playerindex | Player index. Item delimiter. |
playerid | Player unique identifier. Equivalent to "player id <playerindex> ?". |
ip | Player IP and port. Equivalent to "player ip <playerindex> ?". |
name | Player name. Equivalent to "player name <playerindex> ?". |
model | Player model. Equivalent to "player model <playerindex> ?". |
displaytype | Player display type. Equivalent to "player displaytype <playerindex> ?". |
connected | Connected state. Equivalent to "<playerid> connected ?". |
Example:
Request: "players 0 2<LF>"
Response: "players 0 2 count:2 playerindex:0 playerid:a5:41:d2:cd:cd:05 ip:127.0.0.1:60488 name:127.0.0.1 model:softsqueeze displaytype:graphic-280x16 connected:1 playerindex:1 playerid:00:04:20:02:00:c8 ip:192.168.1.22:3483 name:Movy model:slimp3 displaytype:noritake-katakana connected:1<LF>"
rescan
The "rescan" command allows the caller to have the SlimServer rescan its music library, reloading the music file information.
Examples:
Request: "rescan<LF>"
Response: "rescan<LF>"
wipecache
The "wipecache" command allows the caller to have the SlimServer rescan its music library, reloading the music file information. This differs from the "rescan" command in that it first clears the tag database.
Examples:
Request: "wipecache<LF>"
Response: "wipecache<LF>"
info total genres ?
The "info total genres ?" command returns the number of unique genres in the SlimServer music database.
Examples:
Request: "info total genres ?<LF>"
Response: "info total genres 18<LF>"
info total artists ?
The "info total artists ?" command returns the number of unique artists in the SlimServer music database.
Examples:
Request: "info total artists ?<LF>"
Response: "info total artists 18<LF>"
info total albums ?
The "info total albums ?" command returns the number of unique albums in the SlimServer music database.
Examples:
Request: "info total albums ?<LF>"
Response: "info total albums 18<LF>"
info total songs ?
The "info total songs ?" command returns the number of unique songs in the SlimServer music database.
Examples:
Request: "info total songs ?<LF>"
Response: "info total songs 18<LF>"
genres <start> <itemsPerResponse> <taggedParameters>
The "genres" command returns all genres known by the SlimServer.
Accepted tagged parameters:
Tag | Description |
search | Search substring. The search is case insensitive. |
Returned tagged parameters:
Tag | Description |
rescan | Returned with value 1 if the SlimServer is still scanning the database. The results may therefore be incomplete. Not returned if no scan is in progress. |
count | Number of results returned by the query. If no search string is present, this is the same value as returned by "info total genres ?" |
For each genre: | |
genre | Genre name. Item delimiter. |
Example:
Request: "genres 0 5<LF>"
Response: "genres 0 5 rescan:1 count:6 genre:Acid%20Jazz genre:Alternative%20&%20Punk genre:French genre:No%20Genre genre:Pop<LF>"Request: "genres 0 5 search:unk<LF>"
Response: genres 0 5 search:unk count:1 genre:Alternative%20&%20Punk<LF>"
artists <start> <itemsPerResponse> <taggedParameters>
The "artists" command returns all artists known by the SlimServer.
Accepted tagged parameters:
Tag | Description |
search | Search substring. The search is case insensitive. |
genre | Genre name, to restrict the results to those artists with songs of that genre. |
album | Album name, to restrict the results to those artists with songs of that album. |
Returned tagged parameters:
Tag | Description |
rescan | Returned with value 1 if the SlimServer is still scanning the database. The results may therefore be incomplete. Not returned if no scan is in progress. |
count | Number of results returned by the query. If no search string is present, this is the same value as returned by "info total artists ?" |
For each artist: | |
artist | Artist name. Item delimiter. |
Example:
Request: "artists 0 5<LF>"
Response: artists 0 5 count:7 artist:Anastacia artist:Calogero artist:Evanescence artist:Leftfield%20%26%20Lydon artist:Llorca<LF>"Request: "artists 0 5 genre:Pop<LF>"
Response: artists 0 5 genre:Pop count:2 artist:Anastacia artist:Sarah%20Connor<LF>"
albums <start> <itemsPerResponse> <taggedParameters>
The "albums" command returns all albums known by the SlimServer.
Accepted tagged parameters:
Tag | Description |
search | Search substring. The search is case insensitive. |
genre | Genre name, to restrict the results to those albums with songs of that genre. |
artist | Artist name, to restrict the results to those albums with songs of that artist. |
Returned tagged parameters:
Tag | Description |
rescan | Returned with value 1 if the SlimServer is still scanning the database. The results may therefore be incomplete. Not returned if no scan is in progress. |
count | Number of results returned by the query. If no search string is present, this is the same value as returned by "info total albums ?" |
For each album: | |
album | Album name. Item delimiter. |
Example:
Request: "albums 0 4<LF>"
Response: "albums 0 4 count:14 album:Amadeus%20(Disc%201%20of%202) album:Anastacia album:Bounce%20[Single] album:Fallen<LF>"Request: "albums 0 5 genre:Pop<LF>"
Response: "albums 0 5 genre:Pop count:2 album:Anastacia album:Bounce%20[Single]<LF>"Request: "albums 0 5 artist:Sarah%20Connor<LF>"
Response: "albums 0 5 artist:Sarah%20Connor count:1 album:Bounce%20[Single]<LF>"
songinfo <start> <itemsPerResponse> <taggedParameters>
The "songinfo" command returns all the information on a song known by the SlimServer.
Accepted tagged parameters:
Tag | Description |
path | Song path as returned by other CLI commands. This is a mandatory parameter. |
tags | Determines which tags are returned. Each returned tag is identified by a letter (see below). The default value is all info except the path. |
Returned tagged parameters:
Tag | Description | |
rescan | Returned with value 1 if the SlimServer is still scanning the database. The results may therefore be incomplete. Not returned if no scan is in progress. | |
count | Number of results returned by the query, that is, total number of elements to return for this song. | |
title | Song title | |
g | genre | Genre name. Only if known. |
a | artist | Artist name. Only if known. |
c | composer | Composer name. Only if known. |
b | band | Band name. Only if known. |
u | conductor | Conductor name. Only if known. |
l | album | Album name. Only if known. |
d | duration | Song duration in seconds. |
i | disc | Disc number. Only if known. |
q | disccount | Number of discs. Only if known. |
t | track | Track number. Only if known. |
y | year | Song year. Only if known. |
m | bpm | Beats per minute. Only if known. |
k | comment | Song comments, if any. |
o | type | Content type. Only if known. |
v | tagversion | Version of tag information in song file. Only if known. |
r | bitrate | Song bitrate. Only if known. |
f | filelength | Song file length in bytes. Only if known. |
z | drm | Digital rights information. Only if known. |
j | coverart | 1 if coverart is available for this song. Not listed otherwise. |
h | coverthumb | 1 if cover thumbnail is available for this song. Not listed otherwise. |
n | modtime | Date and time song file was last changed. |
p | path | Song file path. Used as <item> parameter for the "playlist add" command, for example. |
Example:
Request: "songinfo 0 6 path:file:///Users/dean/slimp3/Music/Anastacia/Anastacia/Left%2520Outside%2520Alone.mp3<LF>"
Response: "songinfo 0 6 path:file:///Users/dean/slimp3/Music/Anastacia/Anastacia/Left%2520Outside%2520Alone.mp3 count:17 title:Left%20Outside%20Alone genre:Pop artist:Anastacia composer:D.%20Austin/G.%20Ballard album:Anastacia duration:257.488975<LF>"
titles|songs <start> <itemsPerResponse> <taggedParameters>
The "titles" command returns all titles known by the SlimServer.
Accepted tagged parameters:
Tag | Description |
genre | Genre name, to restrict the results to the titles of that genre. |
artist | Artist name, to restrict the results to the titles of that artist. |
album | Album name, to restrict the results to the titles of that album. |
tags | Determines which tags are returned. Each returned tag is identified by a letter (see command "songinfo" for a list of possible fields and their identifying letter). The default tags value for this command is "galdp". |
search | Search substring. The search is case insensitive. |
sort | Sorting, one of "titles" (the default) or "tracks". The track field ("t") is added automatically to the response. Sorting by tracks is possible only if tracks are defined and for a single album. |
Returned tagged parameters:
Tag | Description |
rescan | Returned with value 1 if the SlimServer is still scanning the database. The results may therefore be incomplete. Not returned if no scan is in progress. |
count | Number of results returned by the query. If no search string is present, this is the same value as returned by "info total songs ?" |
For each title: | |
index | Title index, zero-based. Item delimiter. |
Tags | Same tags as defined in command "songinfo". |
Example:
Request: "titles 0 2<LF>"
Response: "titles 0 2 count:100 index:0 title:Ancestral%20Aid genre:Soundtrack artist:Various%20Artists album:The%20Hunt%20For%20Red%20October duration:136.93387755102 disc:1 track:5 year:1990 path:file:///Users/dean/slimp3/Music/Various%20Artists/The%20Hunt%20For%20Red%20October/Ancestral%20Aid.mp3 index:1 title:Any%20How genre:Acid%20Jazz artist:Llorca album:New%20Comer duration:340.297142857143 track:5 year:2001 path:...<LF>"Request: "titles 0 12 album:Anastacia tags:p<LF>"
Response: "titles 0 12 album:Anastacia tags:p count:12 index:0 title:Heavy%20On%20My%20Heart path:... index:1 title:I%20Do path:... index:2 title:Left%20Outside%20Alone path:...<LF>"
playlists <start> <itemsPerResponse> <taggedParameters>
The "playlists" command returns all playlists known by the SlimServer.
Accepted tagged parameters:
Tag | Description |
dir | Virtual playlist directory, as returned below (dig down). |
search | Search substring. The search is case insensitive and performed on the item name (song title, directory name or playlist name). |
tags | Determines which tags are returned. Each returned tag is identified by a letter (see below). The default value is "galdp". |
Returned tagged parameters:
Tag | Description |
rescan | Returned with value 1 if the SlimServer is still scanning the database. The results may therefore be incomplete. Not returned if no scan is in progress. |
count | Number of results returned by the query. |
For each item: | |
index | Item index, zero-based. Item delimiter. |
If item is path: | |
item | Name of the playlist or directory |
dir | Virtual playlist directory to dig down into playlist or directory |
If item is song: | |
Tags | Same tags as defined in command "songinfo". |
Example:
Request: "playlists 0 2<LF>"
Response: "playlists 0 2 count:2 index:0 item:ShoutcastBrowser%20Recently%20Played dir:__playlists/ShoutcastBrowser_Recently_Played index:1 item:SUPER dir:__playlists/SUPER.m3u<LF>"Request: "playlists 0 2 dir:__playlists/SUPER.m3u<LF>"
Response: "playlists 0 2 dir:__playlists/SUPER.m3u count:3 index:0 title:Left%20Outside%20Alone genre:Pop artist:Anastacia composer:D.%20Austin/G.%20Ballard album:Anastacia duration:257.488975 disc:1 track:2 year:2004 path:file:///Users/dean/slimp3/Music/Anastacia/Anastacia/Left%20Outside%20Alone.mp3 index:1 title:Bounce%20[Original%20Version] genre:Pop artist:Sarah%20Connor album:Bounce%20[Single] duration:252.630204081633 disc:1 track:3 year:2003 path:file:///Users/dean/slimp3/Music/Sarah%20Connor/Bounce%20[Single]/Bounce%20[Original%20Version].mp3<LF>"
<playerid> mode <play|pause|stop|?>
The "mode" command allows to set the player playlist mode directly, or to query the player state. "mode play" is equivalent to "play", "mode stop" to "stop", and "mode pause" to "pause 1".
Request: "04:20:00:12:23:45 mode ?<LF>"
Response: "04:20:00:12:23:45 mode stop<LF>"
<playerid> play
The "play" command allows to start playing the current playlist.
Request: "04:20:00:12:23:45 play<LF>"
Response: "04:20:00:12:23:45 play<LF>"
<playerid> stop
The "stop" command allows to stop playing the current playlist.
Request: "04:20:00:12:23:45 stop<LF>"
Response: "04:20:00:12:23:45 stop<LF>"
<playerid> pause <0|1|>
You may use "pause 1" to force the player to pause, "pause 0" to force the player to unpause and "pause" to toggle the pause state.
Request: "04:20:00:12:23:45 pause<LF>"
Response: "04:20:00:12:23:45 pause<LF>"
<playerid> time <number|-number|+number|?>
The "time" command allows you to query the current number of seconds that the current song has been playing by passing in a "?". You may jump to a particular position in a song by specifying a number of seconds to seek to. You may also jump to a relative position within a song by putting an explicit "-" or "+" character before a number of second you would like to seek.
Examples:
Request: "04:20:00:12:23:45 time ?<LF>"
Response: "04:20:00:12:23:45 time 12.55<LF>"Request: "04:20:00:12:23:45 time 5<LF>"
Response: "04:20:00:12:23:45 time 5<LF>"Request: "04:20:00:12:23:45 time -5<LF>"
Response: "04:20:00:12:23:45 time -5<LF>"
<playerid> genre ?
<playerid> artist ?
<playerid> album ?
<playerid> title ?
<playerid> duration ?
<playerid> path ?
The "genre", "artist", "album", "title" "duration" and "path" commands allow for querying information about the song currently playing.
Examples:
Request: "04:20:00:12:23:45 genre ?<LF>"
Response: "04:20:00:12:23:45 genre Rock<LF>"Request: "04:20:00:12:23:45 artist ?<LF>"
Response: "04:20:00:12:23:45 artist Abba<LF>"Request: "04:20:00:12:23:45 album ?<LF>"
Response: "04:20:00:12:23:45 album Greatest%20Hits<LF>"Request: "04:20:00:12:23:45 title ?<LF>"
Response: "04:20:00:12:23:45 title Voulez%20vous<LF>"Request: "04:20:00:12:23:45 duration ?<LF>"
Response: "04:20:00:12:23:45 duration 103.2<LF>"Request: "04:20:00:12:23:45 path ?<LF>"
Response: "04:20:00:12:23:45 path pathtofile<LF>"
<playerid> playlist play <item> [<title>]
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.
Examples:
Request: "04:20:00:12:23:45 playlist play /music/abba/01_Voulez_Vous.mp3<LF>"
Response: "04:20:00:12:23:45 playlist play /music/abba/01_Voulez_Vous.mp3<LF>"
<playerid> playlist add <item>
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.
Examples:
Request: "04:20:00:12:23:45 playlist add /music/abba/01_Voulez_Vous.mp3<LF>"
Response: "04:20:00:12:23:45 playlist add /music/abba/01_Voulez_Vous.mp3<LF>"Request: "04:20:00:12:23:45 playlist add /playlists/abba.m3u<LF>"
Response: "04:20:00:12:23:45 playlist add /playlists/abba.m3u<LF>"
<playerid> playlist insert <item>
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.
Examples:
Request: "04:20:00:12:23:45 playlist insert /music/abba/01_Voulez_Vous.mp3<LF>"
Response: "04:20:00:12:23:45 playlist insert /music/abba/01_Voulez_Vous.mp3<LF>"Request: "04:20:00:12:23:45 playlist insert /playlists/abba.m3u<LF>"
Response: "04:20:00:12:23:45 playlist insert /playlists/abba.m3u<LF>"
<playerid> playlist deleteitem <item>
The "playlist deleteitem" command removes the specified song URL, playlist or directory contents from the current playlist.
Examples:
Request: "04:20:00:12:23:45 playlist deleteitem /music/abba/01_Voulez_Vous.mp3<LF>"
Response: "04:20:00:12:23:45 playlist deleteitem /music/abba/01_Voulez_Vous.mp3<LF>"
<playerid> playlist move <fromindex> <toindex>
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.
Examples:
Request: "04:20:00:12:23:45 playlist move 0 5<LF>"
Response: "04:20:00:12:23:45 playlist move 0 5<LF>"
<playerid> playlist delete <songindex>
The playlist delete" command deletes the song at the specified index from the current playlist.
Examples:
Request: "04:20:00:12:23:45 playlist delete 5<LF>"
Response: "04:20:00:12:23:45 playlist delete 5<LF>"
<playerid> playlist resume <playlist>
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.
Examples:
Request: "04:20:00:12:23:45 playlist resume abba<LF>"
Response: "04:20:00:12:23:45 playlist resume abba<LF>"
<playerid> playlist save <playlist>
Save 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.
Examples:
Request: "04:20:00:12:23:45 playlist save abba<LF>"
Response: "04:20:00:12:23:45 playlist save abba<LF>"
<playerid> playlist loadalbum <genre> <artist> <album>
The "playlist loadalbum" command puts songs matching the specified genre artist and album criteria on the playlist. Songs previously in the playlist are discarded.
Examples:
Request: "04:20:00:12:23:45 playlist loadalbum Rock Abba *<LF>"
Response: "04:20:00:12:23:45 playlist loadalbum Rock Abba *<LF>"
<playerid> playlist addalbum <genre> <artist> <album>
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.
Examples:
Request: "04:20:00:12:23:45 playlist addalbum Rock Abba *<LF>"
Response: "04:20:00:12:23:45 playlist addalbum Rock Abba *<LF>"
<playerid> playlist insertalbum <genre> <artist> <album>
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.
Examples:
Request: "04:20:00:12:23:45 playlist addalbum Rock Abba *<LF>"
Response: "04:20:00:12:23:45 playlist addalbum Rock Abba *<LF>"
<playerid> playlist deletealbum <genre> <artist> <album>
The "playlist deletealbum" command removes songs matching the specified genre artist and album criteria from the playlist.
Examples:
Request: "04:20:00:12:23:45 playlist deletealbum Rock Abba *<LF>"
Response: "04:20:00:12:23:45 playlist deletealbum Rock Abba *<LF>"
<playerid> playlist clear
The "playlist clear" command removes any song that is on the playlist. The player is stopped.
Examples:
Request: "04:20:00:12:23:45 playlist clear<LF>"
Response: "04:20:00:12:23:45 playlist clear<LF>"
<playerid> playlist zap <songindex>
The "playlist zap" command adds the song at index songindex into the zapped song playlist.
Examples:
Request: "04:20:00:12:23:45 playlist zap 3<LF>"
Response: "04:20:00:12:23:45 playlist zap 3<LF>"
<playerid> playlist name ?
The "playlist name" command returns the name of the saved playlist last loaded into the Now Playing playlist, if any.
Examples:
Request: "04:20:00:12:23:45 playlist name ?<LF>"
Response: "04:20:00:12:23:45 playlist name Jazz%20Favorites<LF>"
<playerid> playlist url ?
The "playlist url" command returns the URL of the saved playlist last loaded into the Now Playing playlist, if any.
Examples:
Request: "04:20:00:12:23:45 playlist url ?<LF>"
Response: "04:20:00:12:23:45 playlist url file:///Users/dean/Music/testmusic/Zapped%20Songs.m3u<LF>"
<playerid> playlist 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.
Examples:
Request: "04:20:00:12:23:45 playlist modified ?<LF>"
Response: "04:20:00:12:23:45 playlist modified 0<LF>"
<playerid> playlist index <index|+index|-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. The value of the current song index may be obtained by passing in "?" as a parameter.
Examples:
Request: "04:20:00:12:23:45 playlist index +1<LF>"
Response: "04:20:00:12:23:45 playlist index +1<LF>"Request: "04:20:00:12:23:45 playlist index 5<LF>"
Response: "04:20:00:12:23:45 playlist index 5<LF>"Request: "04:20:00:12:23:45 playlist index ?<LF>"
Response: "04:20:00:12:23:45 playlist index 5<LF>"
<playerid> playlist genre <index> ?
<playerid> playlist artist <index> ?
<playerid> playlist album <index> ?
<playerid> playlist title <index> ?
<playerid> playlist duration <index> ?
<playerid> playlist path <index> ?
The "playlist genre", "playlist artist", "playlist album", "playlist title", "playlist path" and "playlist duration" commands return the requested information for a given song at an index position in the current playlist. The path may be a path to the file or a URL.
Examples:
Request: "04:20:00:12:23:45 playlist genre 3 ?<LF>"
Request: "04:20:00:12:23:45 playlist genre 3 Rock<LF>"Request: "04:20:00:12:23:45 playlist artist 3 ?<LF>"
Response: "04:20:00:12:23:45 playlist artist 3 Abba<LF>"Request: "04:20:00:12:23:45 playlist album 3 ?<LF>"
Response: "04:20:00:12:23:45 playlist album 3 Greatest Hits<LF>"Request: "04:20:00:12:23:45 playlist title 3 ?<LF>"
Response: "04:20:00:12:23:45 playlist title 3 Voulez Vous<LF>"Request: "04:20:00:12:23:45 playlist path 3 ?<LF>"
Response: "04:20:00:12:23:45 playlist path 3 <LF>"Request: "04:20:00:12:23:45 playlist duration 3 ?<LF>"
Response: "04:20:00:12:23:45 playlist duration 3 103.2<LF>"
<playerid> playlist tracks ?
The "playlist tracks" command returns the the total number of tracks in the current playlist
Example:
Request: "04:20:00:12:23:45 playlist tracks ?<LF>"
Response: "04:20:00:12:23:45 playlist tracks 7<LF>"
<playerid> playlist shuffle <0|1|2|?|>
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.
Example:
Request: "04:20:00:12:23:45 playlist shuffle ?<LF>"
Response: "04:20:00:12:23:45 playlist shuffle 1<LF>"Request: "04:20:00:12:23:45 playlist shuffle 0<LF>"
Response: "04:20:00:12:23:45 playlist shuffle 0<LF>"
<playerid> playlist repeat <0|1|2|?|>
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.
Example:
Request: "04:20:00:12:23:45 playlist repeat ?<LF>"
Response: "04:20:00:12:23:45 playlist repeat 2<LF>"Request: "04:20:00:12:23:45 playlist repeat 0<LF>"
Response: "04:20:00:12:23:45 playlist repeat 0<LF>"
<playerid> status <start> <itemsPerResponse> <taggedParameters>
The "status" command returns the complete status about a given player, including the current playlist. Set the <start> parameter to "-" to have the command return the playlist data starting from the current song.
Accepted tagged parameters:
Tag | Description |
tags | Determines which tags are returned. Each returned tag is identified by a letter (see command "songinfo" for a list of possible fields and their identifying letter). The default tags value for this command is "gald". |
Returned tagged parameters:
Tag | Description |
rescan | Returned with value 1 if the SlimServer is still scanning the database. The results may therefore be incomplete. Not returned if no scan is in progress. |
player_name | Name of the player. |
player_connected | Connected state of the player. |
power | Power state of the player. |
signalstrength | Signal strength (only for Squeezeboxen). |
If player is on: | |
mode | Player mode. |
rate | Player rate. Only if there is a current song. |
time | Elapsed time into the current song. Decimal seconds. Only if current song. |
duration | Duration of the current song. Decimal seconds. Only if current song. |
sleep | If set to sleep, the amount it was set to. |
will_sleep_in | Minutes lefts until sleeping. Only if set to sleep. |
mixer volume | |
mixer treble | |
mixer bass | |
mixer pitch | Not for SliMP3 players. |
playlist repeat | 0 no repeat, 1 repeat song, 2 repeat playlist. |
playlist shuffle | 0 no shuffle, 1 shuffle songs, 2 shuffle albums. |
playlist_cur_index | Index (first is 0) of the current song in the playlist. Only if there is a playlist. |
playlist_tracks | Number of tracks in the current playlist. Only if there is a playlist. |
If playlist information exist/requested, for each song in the playlist: | |
playlist index | Index (first item is 0) of the playlist entry in the player playlist. Unless <start> is "-", the first returned instance of this field is equal to start. If <start> is "-", the first returned instance of this field contains the index of the currently playing song in the player playlist. Item seperator. |
Tags | Same tags as defined in command "songinfo". |
Example:
[% PROCESS helpfooter.html %]Request: "a5:41:d2:cd:cd:05 status 0 2 tags:<LF>"
Response: "a5:41:d2:cd:cd:05 status 0 2 tags: player_name:127.0.0.1 player_connected:1 power:1 mode:play rate:1 time:13.7129358076728 duration:252.630204081633 mixer%20volume:50 mixer%20treble:50 mixer%20bass:50 mixer%20pitch:100 playlist%20repeat:2 playlist%20shuffle:0 playlist_cur_index:1 playlist_tracks:3 playlist%20index:0 title:Left%20Outside%20Alone playlist%20index:1 title:Bounce%20[Original%20Version]<LF>"Request: "a5:41:d2:cd:cd:05 status - 2 tags:<LF>"
Response: "a5:41:d2:cd:cd:05 status - 2 tags: player_name:127.0.0.1 player_connected:1 power:1 mode:play rate:1 time:18.721127818274 duration:252.630204081633 mixer%20volume:50 mixer%20treble:50 mixer%20bass:50 mixer%20pitch:100 playlist%20repeat:2 playlist%20shuffle:0 playlist_cur_index:1 playlist_tracks:3 playlist%20index:1 title:Bounce%20[Original%20Version] playlist%20index:2 title:Open%20Up%20[Radio%20Edit]<LF>"