aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* queue/playlist/command: move rangeJeffrey Middleton2009-03-261-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]
* log: removed DEBUG() and FATAL()Max Kellermann2009-03-151-4/+3
| | | | Use GLib the logging functions g_debug(), g_error() instead.
* command: return COMMAND_RETURN_OK in handle_addid()Max Kellermann2009-03-141-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.
* command: handle the addToPlaylist() result properlyMax Kellermann2009-03-141-1/+2
| | | | | addToPlaylist() has a "enum playlist_result" return value. Convert that to "enum command_return" properly.
* command: use sticker_song_get() instead of sticker_song_list_values()Max Kellermann2009-03-141-11/+10
|
* volume: use bool instead of intMax Kellermann2009-03-141-8/+14
| | | | | Return true/false on success/failure, instead of 0/-1. Pass true/false instead of 1/0 for the "rel" boolean parameter.
* all: Update copyright header.Avuton Olrich2009-03-131-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.
* Move from the opaque GPtrArray to GHashTable for sticker lists.Eric Wollesen2009-03-111-20/+13
|
* Add sticker list command.Eric Wollesen2009-03-031-1/+29
| | | | | [mk: merged memory leak patch; fixed indentation (tabs); fixed documentation typo]
* tag: no CamelCaseMax Kellermann2009-02-271-1/+1
| | | | Renamed numOfItems to num_items.
* ls: moved generic URI utilities to uri.cMax Kellermann2009-02-251-0/+1
| | | | | "ls" is a bad name for a library which parses URIs. We'll move the rest of the "ls" library later.
* added the shufflerange commandRomain Bignon2009-02-131-2/+7
| | | | This command shuffles a range of songs.
* audio: moved code to output_command.cMax Kellermann2009-02-111-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.
* audio: moved protocol code to output_print.cMax Kellermann2009-02-101-0/+1
|
* playlist: provide information about "next song"Vladimir S Eremin2009-02-091-0/+10
| | | | | In random mode, this patch allows clients to see the "next song" in the queue.
* playlist_save: added spl_save_playlist()Max Kellermann2009-02-041-1/+1
| | | | spl_save_playlist() is a wrapper for spl_save_queue().
* playlist_print: added wrappers for printing the queueMax Kellermann2009-02-041-31/+13
| | | | Hide the details of the playlist behind wrapper functions.
* playlist_print: use bool instead of intMax Kellermann2009-02-041-8/+12
| | | | | Return true on success, instead of 0. Converted the "detail" parameter to bool.
* playlist_print: no CamelCaseMax Kellermann2009-02-041-2/+2
| | | | Renamed one function.
* playlist: renamed global "playlist" variable to "g_playlist"Max Kellermann2009-02-041-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.
* playlist: moved savePlaylist() and loadPlaylsit() to playlist_save.cMax Kellermann2009-01-251-2/+3
|
* queue_print, dbUtils: use struct locate_item_listMax Kellermann2009-01-241-7/+6
| | | | | Changed the function prototypes to get locate_item_list objects instead of num_items/items.
* locate: added struct locate_item_listMax Kellermann2009-01-241-48/+53
| | | | | Instead of passing two parameters around (number of items, array of items), combine both in a variable size struct.
* locate: no CamelCaseMax Kellermann2009-01-241-14/+14
| | | | Renamed functions and variables.
* playlist: removed locate functions to queue_print.cMax Kellermann2009-01-241-2/+2
| | | | Now playlist.c does not contain any protocol specific code anymore.
* locate: renamed LocateTagItem to "struct locate_item"Max Kellermann2009-01-241-9/+7
| | | | No CamelCase and no typedefs.
* command: use queue_print_*()Max Kellermann2009-01-241-15/+43
| | | | | Replaced several wrapper functions from playlist.c, and make command.c use the queue print functions directly.
* command: eliminate gcc warningLaszlo Ashin2009-01-241-1/+1
| | | | | Argument cmd of function command_available() is not used if mpd was configured without sqlite.
* commands: don't advertise "sticker" unless configuredMax Kellermann2009-01-231-1/+13
| | | | | In the return value of the "commands" command, don't list the "sticker" command if no sticker file is configured.
* playlist: moved PlaylistInfo() to playlist_print.cMax Kellermann2009-01-231-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.
* playlist: removed stopOnError flag from playPlaylist()Max Kellermann2009-01-231-2/+2
| | | | All callers pass false. Don't bother to collect that parameter.
* command: don't restart player in the "status" commandMax Kellermann2009-01-211-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.
* Add space after sticker: to make it consistent.Qball Cow2009-01-201-1/+1
|
* command: added "sticker" commandMax Kellermann2009-01-191-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.
* mapper: make the playlist directory optionalMax Kellermann2009-01-181-0/+5
|
* stats: no CamelCaseMax Kellermann2009-01-181-1/+1
| | | | Renamed functions and types.
* command: restore the "playlistinfo -1" behaviorMax Kellermann2009-01-111-0/+8
| | | | | If a range is "-1", display the whole list. This behavior is undocumented, but some clients rely on it.
* playlist: pass unsigned integers to playlistInfo()Max Kellermann2009-01-101-10/+26
| | | | | A song index cannot be negative. Also require the second parameter to be valid.
* playlist: exclude end of rangeMax Kellermann2009-01-101-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.
* command: playlistinfo now uses a range argument rather than just a song idThomas Jansen2009-01-101-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]]
* command: add a parser for range argumentsThomas Jansen2009-01-101-0/+48
| | | | | A range argument looks like start[:end] and is used to specify the entries of a list that should be returned (rather than the whole list).
* added missing explicit config.h includesMax Kellermann2009-01-081-0/+1
|
* playlist: log errors during loadPlaylist()Max Kellermann2009-01-041-1/+1
| | | | | | Don't call command_error() if loading a song from the playlist fails. This may result in assertion failures, since command_error() may be called more than once.
* ls: renamed functions, no CamelCaseMax Kellermann2009-01-041-4/+4
|
* command: check URI scheme in "addid"Max Kellermann2009-01-041-12/+22
| | | | | Check if the URI scheme is supported by MPD, and print an error message if not. Optimize the checks in "add" and "playlistadd".
* command: added variable "uri" to command handlersMax Kellermann2009-01-041-20/+24
| | | | Don't work with argv[1], give it the better name "uri".
* don't include utils.h when it isn't usedMax Kellermann2009-01-031-1/+2
|
* command: fix adding local files on !WIN32Max Kellermann2009-01-031-1/+5
| | | | | | Due to a typo, adding local files was always denied. Disable the second playlist_append_file() invocation on WIN32.
* Moving mixers to audio outputsViliam Mateicka2008-12-311-3/+3
|
* command: don't allow adding local files on WIN32Max Kellermann2008-12-301-0/+4
| | | | | | There are no unix sockets on WIN32, and therefore no authentication. WIN32 might have similar capabilities, but until we implement them, disable that MPD feature.