| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
spl_save_playlist() is a wrapper for spl_save_queue().
|
|
|
|
| |
Hide the details of the playlist behind wrapper functions.
|
|
|
|
|
| |
Return true on success, instead of 0. Converted the "detail"
parameter to bool.
|
|
|
|
| |
Renamed one function.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Changed the function prototypes to get locate_item_list objects
instead of num_items/items.
|
|
|
|
|
| |
Instead of passing two parameters around (number of items, array of
items), combine both in a variable size struct.
|
|
|
|
| |
Renamed functions and variables.
|
|
|
|
| |
Now playlist.c does not contain any protocol specific code anymore.
|
|
|
|
| |
No CamelCase and no typedefs.
|
|
|
|
|
| |
Replaced several wrapper functions from playlist.c, and make command.c
use the queue print functions directly.
|
|
|
|
|
| |
Argument cmd of function command_available() is not used if mpd was
configured without sqlite.
|
|
|
|
|
| |
In the return value of the "commands" command, don't list the
"sticker" command if no sticker file is configured.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
All callers pass false. Don't bother to collect that parameter.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Renamed functions and types.
|
|
|
|
|
| |
If a range is "-1", display the whole list. This behavior is
undocumented, but some clients rely on it.
|
|
|
|
|
| |
A song index cannot be negative. Also require the second parameter to
be valid.
|
|
|
|
|
| |
In a range "start:end", "end" itself should not be included. Use the
same semantics as other languages implementing ranges, e.g. Python.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]]
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Check if the URI scheme is supported by MPD, and print an error
message if not. Optimize the checks in "add" and "playlistadd".
|
|
|
|
| |
Don't work with argv[1], give it the better name "uri".
|
| |
|
|
|
|
|
|
| |
Due to a typo, adding local files was always denied.
Disable the second playlist_append_file() invocation 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.
|
|
|
|
|
| |
Only include headers which are really needed. os_compat.h aimed to
make MPD easily portable, but was never actually made portable.
|
|
|
|
| |
gmtime_r() is not available.
|
|
|
|
|
|
| |
When a client-specified URI has a scheme which is not supported, do
not try to open it as a local file, but provide a meaningful error
message.
|
|
|
|
|
| |
printRemoteUrlHandlers() cannot fail, and does not need a return
value.
|
|
|
|
|
| |
We want to remove gcc.h eventually. This takes care of all the G_GNUC_PRINTF
macros.
|
| |
|
|
|
|
| |
We shouldn't pass strerror() where a format string is expected.
|
|
|
|
|
|
| |
The client may provide the names of idle events as arguments to the
"idle" command to inform MPD that it is only interested in these
events.
|
|
|
|
|
| |
We don't need to sanitize the path, because the mapper already checks
for malformed paths.
|
|
|
|
| |
Replace a custom data structure with a GLib one.
|
|
|
|
| |
check_bool() accepts only "0" or "1". The range check is superfluous.
|
|
|
|
|
| |
Due to a logic error, no value was valid for the boolean value
parser. Replace "||" with "&&".
|
|
|
|
| |
The function deletePlaylist() shouldn't be in playlist.c.
|
|
|
|
|
| |
The "long" result of strtol() was implicitly casted down to a 32 bit
integer. Add some range checking instead.
|
|
|
|
|
|
|
| |
Many command arguments must not be negative; add a separate
parser/checker function for that. For the same reason, add
check_bool(). This eliminates two strange special cases handlers from
check_int().
|