aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-04-28command: added "sticker delete" commandMax Kellermann1-0/+22
2009-04-28command: use g_ascii_strcasecmp() instead of strcasecmp()Max Kellermann1-1/+1
strcasecmp() is locale dependent, making it a bad choice for internal string comparisons.
2009-04-01command: added command "sticker find"Max Kellermann1-0/+41
This command allows clients to search for stickers with a specified name.
2009-04-01Move db_get_song into sub-handlers. (FReq 2112)Eric Wollesen1-9/+27
db_get_song was being called once for all sub-handlers, but with the addition of the find command, we don't have a URI coming in, so doing db_get_song once won't work anymore. [mk: fixed initialization order]
2009-04-01sticker_print: new library for sending stickers to a clientMax Kellermann1-10/+3
2009-03-31do not consider single mode with "next" commandRomain Bignon1-0/+7
This is a little ugly, but as nextSongInPlaylist is both called when queued is update (in case playlist ended) and for user "next" command, there isn't any other (simple) solution
2009-03-30command: command_error() is not necessary for export.Avuton Olrich1-1/+1
2009-03-30implemented the 'consume' modeRomain Bignon1-1/+23
Consume mode removes each song played
2009-03-27renamed smartstop to single and changed behaviorRomain Bignon1-6/+6
When single mode is enabled, after current song it stops playback, or it replay same song if repeat mode is activated.
2009-03-27implements the smartstop featureRomain Bignon1-0/+22
The smartstop feature is a way to tell mpd to stop playing after current song. This patche provides: - 'state' command returns 'smartstop' state (1 or 0) - 'smartstop' can activate or not the smartstop state - when song is terminated, mpd stops playing and smartstop is set to 0
2009-03-26queue/playlist/command: move rangeJeffrey Middleton1-3/+5
The move command now accepts a range for the first argument, in the same form as other range commands, e.g. move 15:17 3. The first song in the range is placed at the destination position. Note that as with other range commands, the range is inclusive on the left only; this example would move only songs 15 and 16, not 17. [mk: fixed signed/unsigned warnings; use G_MAXUINT instead of UINT_MAX]
2009-03-15log: removed DEBUG() and FATAL()Max Kellermann1-4/+3
Use GLib the logging functions g_debug(), g_error() instead.
2009-03-14command: return COMMAND_RETURN_OK in handle_addid()Max Kellermann1-1/+1
At the last line of handle_addid(), the playlist_result value has already been evaluated. Don't return this variable, it's the wrong type.
2009-03-14command: handle the addToPlaylist() result properlyMax Kellermann1-1/+2
addToPlaylist() has a "enum playlist_result" return value. Convert that to "enum command_return" properly.
2009-03-14command: use sticker_song_get() instead of sticker_song_list_values()Max Kellermann1-11/+10
2009-03-14volume: use bool instead of intMax Kellermann1-8/+14
Return true/false on success/failure, instead of 0/-1. Pass true/false instead of 1/0 for the "rel" boolean parameter.
2009-03-13all: Update copyright header.Avuton Olrich1-6/+7
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
2009-03-11Move from the opaque GPtrArray to GHashTable for sticker lists.Eric Wollesen1-20/+13
2009-03-03Add sticker list command.Eric Wollesen1-1/+29
[mk: merged memory leak patch; fixed indentation (tabs); fixed documentation typo]
2009-02-27tag: no CamelCaseMax Kellermann1-1/+1
Renamed numOfItems to num_items.
2009-02-25ls: moved generic URI utilities to uri.cMax Kellermann1-0/+1
"ls" is a bad name for a library which parses URIs. We'll move the rest of the "ls" library later.
2009-02-13added the shufflerange commandRomain Bignon1-2/+7
This command shuffles a range of songs.
2009-02-11audio: moved code to output_command.cMax Kellermann1-9/+13
The output_command library provides a command interface to the audio outputs. It assumes the input comes from an untrusted source (i.e. the client) and verifies all parameters.
2009-02-10audio: moved protocol code to output_print.cMax Kellermann1-0/+1
2009-02-09playlist: provide information about "next song"Vladimir S Eremin1-0/+10
In random mode, this patch allows clients to see the "next song" in the queue.
2009-02-04playlist_save: added spl_save_playlist()Max Kellermann1-1/+1
spl_save_playlist() is a wrapper for spl_save_queue().
2009-02-04playlist_print: added wrappers for printing the queueMax Kellermann1-31/+13
Hide the details of the playlist behind wrapper functions.
2009-02-04playlist_print: use bool instead of intMax Kellermann1-8/+12
Return true on success, instead of 0. Converted the "detail" parameter to bool.
2009-02-04playlist_print: no CamelCaseMax Kellermann1-2/+2
Renamed one function.
2009-02-04playlist: renamed global "playlist" variable to "g_playlist"Max Kellermann1-40/+41
Export the "g_playlist" variable, and pass it to all playlist functions. This way, we can split playlist.c easier into separate parts. The code which initializes the singleton variable is moved to playlist_global.c.
2009-01-25playlist: moved savePlaylist() and loadPlaylsit() to playlist_save.cMax Kellermann1-2/+3
2009-01-24queue_print, dbUtils: use struct locate_item_listMax Kellermann1-7/+6
Changed the function prototypes to get locate_item_list objects instead of num_items/items.
2009-01-24locate: added struct locate_item_listMax Kellermann1-48/+53
Instead of passing two parameters around (number of items, array of items), combine both in a variable size struct.
2009-01-24locate: no CamelCaseMax Kellermann1-14/+14
Renamed functions and variables.
2009-01-24playlist: removed locate functions to queue_print.cMax Kellermann1-2/+2
Now playlist.c does not contain any protocol specific code anymore.
2009-01-24locate: renamed LocateTagItem to "struct locate_item"Max Kellermann1-9/+7
No CamelCase and no typedefs.
2009-01-24command: use queue_print_*()Max Kellermann1-15/+43
Replaced several wrapper functions from playlist.c, and make command.c use the queue print functions directly.
2009-01-24command: eliminate gcc warningLaszlo Ashin1-1/+1
Argument cmd of function command_available() is not used if mpd was configured without sqlite.
2009-01-23commands: don't advertise "sticker" unless configuredMax Kellermann1-1/+13
In the return value of the "commands" command, don't list the "sticker" command if no sticker file is configured.
2009-01-23playlist: moved PlaylistInfo() to playlist_print.cMax Kellermann1-0/+1
PlaylistInfo() (notice the capital 'P') sends a stored playlist to the client. Move it to a separate library, where all the code which glues the playlist and the MPD protocol together will live.
2009-01-23playlist: removed stopOnError flag from playPlaylist()Max Kellermann1-2/+2
All callers pass false. Don't bother to collect that parameter.
2009-01-21command: don't restart player in the "status" commandMax Kellermann1-1/+0
Don't attempt to restart the player if it was stopped, but there were still songs left on the playlist. This looks like it has been a workaround for a bug which has been fixed long time ago.
2009-01-20Add space after sticker: to make it consistent.Qball Cow1-1/+1
2009-01-19command: added "sticker" commandMax Kellermann1-0/+72
The "sticker" command allows clients to query or manipulate the sticker database. This patch implements the sub-commands "get" and "set"; more will follow soon (enumeration), as well as extended "lsinfo" / "playlistinfo" versions.
2009-01-18mapper: make the playlist directory optionalMax Kellermann1-0/+5
2009-01-18stats: no CamelCaseMax Kellermann1-1/+1
Renamed functions and types.
2009-01-11command: restore the "playlistinfo -1" behaviorMax Kellermann1-0/+8
If a range is "-1", display the whole list. This behavior is undocumented, but some clients rely on it.
2009-01-10playlist: pass unsigned integers to playlistInfo()Max Kellermann1-10/+26
A song index cannot be negative. Also require the second parameter to be valid.
2009-01-10playlist: exclude end of rangeMax Kellermann1-1/+1
In a range "start:end", "end" itself should not be included. Use the same semantics as other languages implementing ranges, e.g. Python.
2009-01-10command: playlistinfo now uses a range argument rather than just a song idThomas Jansen1-4/+5
Loosely based on a patch provided by lesion in bug #1766. The playlistinfo command can now retrieve ranges of the playlist. The new argument indicates which entry is the last one that will be displayed. The number of displayed entries may be smaller than expected if the end of the playlist is reached. Previous usage: playlistinfo [start] New usage: playlistinfo [start[:end]]