Max Kellermann
e5767d6da8
command: return COMMAND_RETURN_OK in handle_addid()
...
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-14 14:36:07 +01:00
Max Kellermann
7b53504a41
command: handle the addToPlaylist() result properly
...
addToPlaylist() has a "enum playlist_result" return value. Convert
that to "enum command_return" properly.
2009-03-14 14:33:19 +01:00
Max Kellermann
24da9410fa
command: use sticker_song_get() instead of sticker_song_list_values()
2009-03-14 14:20:04 +01:00
Max Kellermann
f15d879e37
volume: use bool instead of int
...
Return true/false on success/failure, instead of 0/-1. Pass
true/false instead of 1/0 for the "rel" boolean parameter.
2009-03-14 11:10:21 +01:00
Avuton Olrich
0aee49bdf8
all: Update copyright header.
...
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-13 11:51:55 -07:00
Eric Wollesen
e2dc3c948f
Move from the opaque GPtrArray to GHashTable for sticker lists.
2009-03-11 17:03:01 -06:00
Eric Wollesen
b8ebb748c9
Add sticker list command.
...
[mk: merged memory leak patch; fixed indentation (tabs); fixed
documentation typo]
2009-03-03 07:49:23 +01:00
Max Kellermann
75c2029b1c
tag: no CamelCase
...
Renamed numOfItems to num_items.
2009-02-27 09:01:55 +01:00
Max Kellermann
6823217697
ls: moved generic URI utilities to uri.c
...
"ls" is a bad name for a library which parses URIs. We'll move the
rest of the "ls" library later.
2009-02-25 16:44:06 +01:00
Romain Bignon
9fe459f625
added the shufflerange command
...
This command shuffles a range of songs.
2009-02-13 10:43:30 +01:00
Max Kellermann
9d447dda1d
audio: moved code to output_command.c
...
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-11 18:02:45 +01:00
Max Kellermann
e7505381eb
audio: moved protocol code to output_print.c
2009-02-10 18:51:42 +01:00
Vladimir S Eremin
cde4cb944e
playlist: provide information about "next song"
...
In random mode, this patch allows clients to see the "next song" in
the queue.
2009-02-09 10:38:03 +01:00
Max Kellermann
94685aa9bd
playlist_save: added spl_save_playlist()
...
spl_save_playlist() is a wrapper for spl_save_queue().
2009-02-04 22:15:37 +01:00
Max Kellermann
2a1bef2225
playlist_print: added wrappers for printing the queue
...
Hide the details of the playlist behind wrapper functions.
2009-02-04 22:09:04 +01:00
Max Kellermann
60bec77664
playlist_print: use bool instead of int
...
Return true on success, instead of 0. Converted the "detail"
parameter to bool.
2009-02-04 21:04:30 +01:00
Max Kellermann
f817285922
playlist_print: no CamelCase
...
Renamed one function.
2009-02-04 21:02:11 +01:00
Max Kellermann
8d3205871c
playlist: renamed global "playlist" variable to "g_playlist"
...
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-02-04 18:56:41 +01:00
Max Kellermann
98cb8f3969
playlist: moved savePlaylist() and loadPlaylsit() to playlist_save.c
2009-01-25 14:11:47 +01:00
Max Kellermann
6a2118d04c
queue_print, dbUtils: use struct locate_item_list
...
Changed the function prototypes to get locate_item_list objects
instead of num_items/items.
2009-01-24 15:56:34 +01:00
Max Kellermann
ba7c996266
locate: added struct locate_item_list
...
Instead of passing two parameters around (number of items, array of
items), combine both in a variable size struct.
2009-01-24 15:56:30 +01:00
Max Kellermann
3582977e01
locate: no CamelCase
...
Renamed functions and variables.
2009-01-24 15:26:59 +01:00
Max Kellermann
cf9595df18
playlist: removed locate functions to queue_print.c
...
Now playlist.c does not contain any protocol specific code anymore.
2009-01-24 14:55:28 +01:00
Max Kellermann
53e712aca4
locate: renamed LocateTagItem to "struct locate_item"
...
No CamelCase and no typedefs.
2009-01-24 14:52:05 +01:00
Max Kellermann
627d590ce5
command: use queue_print_*()
...
Replaced several wrapper functions from playlist.c, and make command.c
use the queue print functions directly.
2009-01-24 14:52:04 +01:00
Laszlo Ashin
84b63c45fa
command: eliminate gcc warning
...
Argument cmd of function command_available() is not used if mpd was
configured without sqlite.
2009-01-24 11:13:58 +01:00
Max Kellermann
48d3404727
commands: don't advertise "sticker" unless configured
...
In the return value of the "commands" command, don't list the
"sticker" command if no sticker file is configured.
2009-01-23 18:51:14 +01:00
Max Kellermann
8afe24c1de
playlist: moved PlaylistInfo() to playlist_print.c
...
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-23 16:34:27 +01:00
Max Kellermann
e5c323fd57
playlist: removed stopOnError flag from playPlaylist()
...
All callers pass false. Don't bother to collect that parameter.
2009-01-23 00:10:50 +01:00
Max Kellermann
5541015ac6
command: don't restart player in the "status" command
...
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-21 16:17:57 +01:00
Qball Cow
d10910cc90
Add space after sticker: to make it consistent.
2009-01-20 13:55:21 +01:00
Max Kellermann
f9c693e602
command: added "sticker" command
...
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-19 19:09:49 +01:00
Max Kellermann
9933144de7
mapper: make the playlist directory optional
2009-01-18 16:15:45 +01:00
Max Kellermann
0d449d8df7
stats: no CamelCase
...
Renamed functions and types.
2009-01-18 15:22:26 +01:00
Max Kellermann
983822ea52
command: restore the "playlistinfo -1" behavior
...
If a range is "-1", display the whole list. This behavior is
undocumented, but some clients rely on it.
2009-01-11 17:11:11 +01:00
Max Kellermann
8ebe7bfb25
playlist: pass unsigned integers to playlistInfo()
...
A song index cannot be negative. Also require the second parameter to
be valid.
2009-01-10 17:39:49 +01:00
Max Kellermann
b7c4b78846
playlist: exclude end of range
...
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-10 17:05:03 +01:00
Thomas Jansen
6f0781f039
command: playlistinfo now uses a range argument rather than just a song id
...
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]]
2009-01-10 16:50:34 +01:00
Thomas Jansen
8ed3cf3e6b
command: add a parser for range arguments
...
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).
2009-01-10 16:48:12 +01:00
Max Kellermann
5e93d3682f
added missing explicit config.h includes
2009-01-08 21:37:02 +01:00
Max Kellermann
8c5470a3db
playlist: log errors during loadPlaylist()
...
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.
2009-01-04 18:59:32 +01:00
Max Kellermann
45597cc571
ls: renamed functions, no CamelCase
2009-01-04 17:46:42 +01:00
Max Kellermann
7d87f71d83
command: check URI scheme in "addid"
...
Check if the URI scheme is supported by MPD, and print an error
message if not. Optimize the checks in "add" and "playlistadd".
2009-01-04 16:22:08 +01:00
Max Kellermann
ef0b328a3c
command: added variable "uri" to command handlers
...
Don't work with argv[1], give it the better name "uri".
2009-01-04 16:19:45 +01:00
Max Kellermann
dec4e4ca85
don't include utils.h when it isn't used
2009-01-03 14:52:56 +01:00
Max Kellermann
2cf96abcc1
command: fix adding local files on !WIN32
...
Due to a typo, adding local files was always denied.
Disable the second playlist_append_file() invocation on WIN32.
2009-01-03 12:29:42 +01:00
Viliam Mateicka
9a70c4d06d
Moving mixers to audio outputs
2008-12-31 16:46:41 +01:00
Max Kellermann
bb55ec6b4e
command: don't allow adding local files on WIN32
...
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.
2008-12-30 19:14:13 +01:00
Max Kellermann
95b3430f52
removed os_compat.h
...
Only include headers which are really needed. os_compat.h aimed to
make MPD easily portable, but was never actually made portable.
2008-12-29 17:28:32 +01:00
Max Kellermann
041b8f697b
command: use gmtime() on WIN32
...
gmtime_r() is not available.
2008-12-29 17:28:13 +01:00