Courtney Cavin
7f865f722c
playlist: CamelCaseIsBad
...
Renamed all playlist functions to non-CamelCase.
2009-07-28 18:07:01 -04:00
Max Kellermann
38e9205d4e
command: use the tokenizer library
2009-07-19 15:15:36 +02:00
Max Kellermann
d897170455
playlist: no CamelCase
2009-07-14 21:28:36 +02:00
Max Kellermann
d3b5574d7a
volume: moved range check to handle_setvol()
...
Converted the range checks in volume_level_change() to assertions.
Changed all volume types to "unsigned", expect for those which must be
able to indicate error (-1).
2009-07-06 21:52:10 +02:00
Max Kellermann
90472526e0
volume, mixer: removed the "relative" parameter
...
Since the "volume" command has been removed, nobody uses relative
volumes anymore.
2009-07-06 21:51:24 +02:00
Max Kellermann
206392ad1a
command: removed the "volume" command
...
This command has been deprecated more than 5 years ago (0.10.0). Its
implementation is a kludge, let's remove it now.
2009-07-06 21:51:00 +02:00
Max Kellermann
ce072b89d2
command: added new "status" line with more precise "elapsed time"
2009-06-25 08:37:34 +02:00
Max Kellermann
61b0835512
command: added "sticker delete" command
2009-04-28 20:25:07 +02:00
Max Kellermann
3db834f6b3
command: use g_ascii_strcasecmp() instead of strcasecmp()
...
strcasecmp() is locale dependent, making it a bad choice for internal
string comparisons.
2009-04-28 09:34:03 +02:00
Max Kellermann
e720b5bdf8
command: added command "sticker find"
...
This command allows clients to search for stickers with a specified
name.
2009-04-01 18:53:02 +02:00
Eric Wollesen
c95fa4b441
Move db_get_song into sub-handlers. (FReq 2112)
...
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-01 18:44:39 +02:00
Max Kellermann
cb35d6e687
sticker_print: new library for sending stickers to a client
2009-04-01 17:30:56 +02:00
Romain Bignon
62a72a5e4d
do not consider single mode with "next" command
...
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-31 14:15:33 +02:00
Avuton Olrich
96ab110b44
command: command_error() is not necessary for export.
2009-03-30 19:21:41 +02:00
Romain Bignon
e81f683a18
implemented the 'consume' mode
...
Consume mode removes each song played
2009-03-30 17:37:55 +02:00
Romain Bignon
e7519829ac
renamed smartstop to single and changed behavior
...
When single mode is enabled, after current song it stops playback,
or it replay same song if repeat mode is activated.
2009-03-27 15:28:49 +01:00
Romain Bignon
e46722b2eb
implements the smartstop feature
...
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-27 14:58:31 +01:00
Jeffrey Middleton
13208bf5a7
queue/playlist/command: move range
...
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-26 22:02:56 +01:00
Max Kellermann
a899c210b9
log: removed DEBUG() and FATAL()
...
Use GLib the logging functions g_debug(), g_error() instead.
2009-03-15 18:23:00 +01:00
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