aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* added the shufflerange commandRomain Bignon2009-02-131-1/+1
| | | | This command shuffles a range of songs.
* playlist: provide information about "next song"Vladimir S Eremin2009-02-091-0/+2
| | | | | In random mode, this patch allows clients to see the "next song" in the queue.
* playlist: pass const playlist pointersMax Kellermann2009-02-041-9/+6
| | | | Pass constant playlist objects to functions which do not modify it.
* playlist: renamed global "playlist" variable to "g_playlist"Max Kellermann2009-02-041-32/+66
| | | | | | | 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/+0
|
* stored_playlist: moved configuration variables from playlist.cMax Kellermann2009-01-251-4/+0
| | | | | Don't declare and export variables specific to stored playlists in playlist.c/playlist.h.
* playlist: removed locate functions to queue_print.cMax Kellermann2009-01-241-11/+0
| | | | Now playlist.c does not contain any protocol specific code anymore.
* locate: renamed LocateTagItem to "struct locate_item"Max Kellermann2009-01-241-3/+3
| | | | No CamelCase and no typedefs.
* command: use queue_print_*()Max Kellermann2009-01-241-19/+0
| | | | | Replaced several wrapper functions from playlist.c, and make command.c use the queue print functions directly.
* playlist: added playlist_get_queue()Max Kellermann2009-01-241-0/+6
| | | | | To allow code outside playlist.c to access the "queue" object, provide a function which returns a const pointer.
* playlist: renamed the Playlist typedef to "struct playlist"Max Kellermann2009-01-241-2/+2
| | | | No typedefs.
* playlist: moved stopOnError and errorCount into struct playlistMax Kellermann2009-01-241-0/+14
| | | | Moved the 2 remaining global variables into the playlist struct.
* playlist: moved PlaylistInfo() to playlist_print.cMax Kellermann2009-01-231-2/+0
| | | | | | 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: pass const pointers to search functionsMax Kellermann2009-01-231-4/+6
| | | | The LocateTagItem objects are not modified.
* playlist: added source commentsMax Kellermann2009-01-231-1/+4
| | | | | | The playlist.c source is currently quite hard to understand. I have managed to wrap my head around it, and this patch attempts to explain it to the next guy.
* playlist: removed stopOnError flag from playPlaylist()Max Kellermann2009-01-231-2/+2
| | | | All callers pass false. Don't bother to collect that parameter.
* playlist: replaced playlist_state with flag playlist.playingMax Kellermann2009-01-231-0/+6
| | | | | | There were only two possible states: STOP and PLAY. The code looks a lot easier if we use a bool instead. Move the variable into the playlist struct.
* playlist: documented struct membersMax Kellermann2009-01-231-0/+13
| | | | Added several comments.
* playlist: moved code to queue.cMax Kellermann2009-01-221-10/+3
| | | | | Attempt to untie the playlist.c knot: moved the playlist storage code to queue.c, struct queue.
* command: don't restart player in the "status" commandMax Kellermann2009-01-211-2/+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.
* event_pipe: added "TAG" eventMax Kellermann2009-01-201-5/+0
| | | | | | The "TAG" event is emitted by the player thread when the current song's tag has changed. Split this event from "PLAYLIST" and make it a separate callback, which is more efficient.
* mapper: make the playlist directory optionalMax Kellermann2009-01-181-1/+2
|
* playlist: pass unsigned integers to playlistInfo()Max Kellermann2009-01-101-1/+10
| | | | | A song index cannot be negative. Also require the second parameter to be valid.
* command: playlistinfo now uses a range argument rather than just a song idThomas Jansen2009-01-101-1/+1
| | | | | | | | | | | | | 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]]
* 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.
* command: don't allow adding local files on WIN32Max Kellermann2008-12-301-0/+2
| | | | | | 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.
* playlist: track song metadata changesMax Kellermann2008-11-111-0/+5
| | | | | When the tag of the current song changes (e.g. a new tag was sent in the stream), update the playlist, so clients pick up the new tag.
* path: moved playlist_dir to mapper.cMax Kellermann2008-10-311-1/+0
| | | | | Added the function map_spl_utf8_to_fs() which replaces utf8_to_fs_playlist_path().
* added prefix to header macrosMax Kellermann2008-10-311-2/+2
| | | | | | | "LOG_H" is a macro which is also used by ffmpeg/log.h. This is ffmpeg's fault, because short macros should be reserved for applications, but since it's always a good idea to choose prefixed macro names, even for applications, we are going to do that in MPD.
* stored_playlist: renamed and moved spl_delete() to stored_playlist.cMax Kellermann2008-10-231-2/+0
| | | | The function deletePlaylist() shouldn't be in playlist.c.
* playlist: unsigned integersMax Kellermann2008-10-231-18/+18
| | | | | | There are some integers which have a "magic" -1 value which means "undefined" or "nothing". All others can be converted to unsigned, since they must not contain a negative number.
* stored_playlist: moved functions from playlist.cMax Kellermann2008-10-221-4/+0
| | | | | | The two functions clearStoredPlaylist() and addToStoredPlaylist() don't belong into playlist.c. clearStoredPlaylist() was a wrapper for spl_clear(), and is converted into a CPP macro for now.
* playlist: added support for adding songs not in the music databaseMax Kellermann2008-10-151-0/+8
| | | | | Clients which have authenticated via unix socket may add local files to the MPD playlist, provided that they own the file.
* use the "bool" data type instead of "int"Max Kellermann2008-10-081-7/+8
| | | | "bool" should be used in C99 programs for boolean values.
* song: converted typedef Song to struct songMax Kellermann2008-10-081-3/+9
| | | | Again, a data type which can be forward-declared.
* switch to C99 types, part IIMax Kellermann2008-09-291-4/+4
| | | | | Do full C99 integer type conversion in all modules which were not touched by Eric's merged patch.
* playlist: deleteASongFromPlaylist takes a const Song *Eric Wong2008-09-291-1/+1
| | | | We don't change the song pointer there, either.
* playlist: don't pass "fd" to showPlaylist(), playlistChangesPosId()Max Kellermann2008-09-071-2/+2
| | | | Pass the client struct instead of the raw file descriptor.
* playlist: pass struct client to loadPlaylist()Max Kellermann2008-09-071-1/+1
| | | | | | | The function loadPlaylist() wants to report incremental errors to the client, for this reason we cannot remove its protocol dependency right now. Instead, make it use the client struct instead of the raw file descriptor.
* pass "struct client" to dbUtils.c, song.c, tag_print.cMax Kellermann2008-09-071-6/+8
| | | | | | Don't pass the raw file descriptor around. This migration patch is rather large, because all of the sources have inter dependencies - we have to change all of them at the same time.
* playlist: don't pass "fd" to storedPlaylist.c functionsMax Kellermann2008-09-071-5/+3
| | | | | Return an "enum playlist_result" value instead of calling commandError() in storedPlaylist.c.
* playlist: don't pass "fd" to playlist.c functionsMax Kellermann2008-09-071-19/+29
| | | | | | The playlist library shouldn't talk to the client if possible. Introduce the "enum playlist_result" type which the caller (i.e. command.c) may use to generate an error message.
* playlist: showPlaylist() and shufflePlaylist() cannot failMax Kellermann2008-09-071-2/+2
| | | | Make them both return void.
* playlist: moved "repeat" and "random" value checks to command.cMax Kellermann2008-09-071-2/+2
| | | | | | | | Client's input values should be validated by the command implementation, and the core libraries shouldn't talk to the client directly if possible. Thus, setPlaylistRepeatStatus() and setPlaylistRandomStatus() don't get the file descriptor, and cannot fail (return void).
* playlist: added is_valid_playlist_name()Max Kellermann2008-09-071-0/+2
| | | | | | | | The function valid_playlist_name() checks the name, but it insists on reporting an eventual error to the client. The new function is_valid_playlist_name() is more generic: it just returns a boolean, and does not care what the caller will use it for. The old function valid_playlist_name() will be removed later.
* dbUtils, playlist, directory: pass constant pointersMax Kellermann2008-09-061-8/+8
| | | | The usual bunch of const pointer conversions.
* include cleanupMax Kellermann2008-08-281-1/+1
| | | | Only include headers which are really needed.
* playlist: eliminate unused fd parametersMax Kellermann2008-08-261-4/+4
| | | | | Again, remove file descriptor parameters, which are not actually used. These functions can also be converted to return void.
* clean up CPP includesMax Kellermann2008-04-121-3/+0
| | | | | | | | | Try to only include headers which are really needed. We should particularly check all "headers including other headers". The long-term goal is to have a manageable, small API for plugins (decoders, output) without so many mpd internals cluttering the namespace. git-svn-id: https://svn.musicpd.org/mpd/trunk@7319 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Fix a few more warnings from -WshadowEric Wong2008-04-121-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7300 09075e82-0dd4-0310-85a5-a0d7c8717e4f