aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* flac: no CamelCaseMax Kellermann2009-01-15
| | | | Renamed types, functions, variables.
* input_curl: don't call input_curl_select() when already at EOFMax Kellermann2009-01-15
| | | | | | Calling input_curl_select() after EOF has been reached causes an assertion failure. This can happen if the HTTP response is empty. Check c->eof before calling input_curl_select().
* input_curl: set "ready" flag on EOFMax Kellermann2009-01-15
| | | | Set the "ready" flag for empty resources.
* input_curl: call curl_multi_info_read() in constructorMax Kellermann2009-01-15
| | | | | To check for early connect failures, call curl_multi_info_read() in the constructor input_curl_open(). This fixes an assertion failure.
* input_curl: added fallback for g_queue_clear()Max Kellermann2009-01-15
| | | | | g_queue_clear() was introduced in GLib 2.14. Add a macro hack for older GLib versions to emulate it.
* log, pcm_convert: added return statements after g_error()Max Kellermann2009-01-15
| | | | | gcc doesn't know that g_error() never returns. Work around the gcc warning.
* mapper: check if g_get_user_special_dir() is supported by GLibMax Kellermann2009-01-15
| | | | | g_get_user_special_dir() was introduced with GLib 2.14. Don't use it in older versions.
* pcm_convert: removed unused variable "dest_size"Max Kellermann2009-01-15
| | | | | dest_size is only used in an assertion. Remove its declaration and move the formula into the assertion.
* decoder_api: added G_GNUC_UNUSED attribute to decoder_initialized()Max Kellermann2009-01-15
| | | | In NDEBUG, the parameter "decoder" is not used.
* listen: don't compile ipv6Supported() if !HAVE_IPV6Max Kellermann2009-01-15
| | | | | The function ipv6Supported() is not used at all when IPv6 support was disabled at compile time.
* oggvorbis: map "Album Artist" to "AlbumArtist"Rasmus Steinke2009-01-15
| | | | | This patch allows mpd to recognise the albumartist tag in the way foobar2000 and others write it to files.
* songvec: sort songs by disc and track numberMax Kellermann2009-01-15
| | | | | Sorting songs by file name does not make much sense. Most of the time, users want to add songs in track order to the playlist.
* tag: added tag_get_value()Max Kellermann2009-01-15
|
* dirvec, songvec: sort using g_utf8_collate()Max Kellermann2009-01-15
| | | | | | Path names in the directory and song structs are always encoded in UTF-8. Don't use strcmp(), it cannot handle UTF-8 characters properly. Use GLib's UTF-8 aware g_utf8_collate() function for that.
* shout: enlarge buffer size to 32 kBAntoine Beaupré2009-01-14
| | | | | | | I was having problems with shoutcast stream outputs before applying the attached patch, which enlarges the shoutcast output buffer. Ideally, this should be configurable, but this resolves the issue for my needs.
* oggvorbis: use g_ascii_strncasecmp() instead of strncasecmp()Max Kellermann2009-01-14
| | | | | Don't depend on the daemon's locale settings. Comment names are ASCII.
* oggvorbis: moved tag look into vorbis_parse_comment()Max Kellermann2009-01-14
| | | | | | vorbis_parse_comment() should be a function which converts one comment to a tag item. It should do everything required to do the conversion, including looping over all possible tag types.
* oggvorbis: moved code to vorbis_copy_comment()Max Kellermann2009-01-14
|
* oggvorbis: use vorbis_comment_value() in vorbis_parse_comment()Max Kellermann2009-01-14
| | | | Eliminate some duplicate code.
* oggvorbis: always allocate a tag objectMax Kellermann2009-01-14
| | | | | | Always allocate a new tag object before parsing the vorbis comments; free it when it turns out to be empty. This simplifies the code a bit.
* oggvorbis: no CamelCaseMax Kellermann2009-01-14
| | | | Renamed functions and variables.
* oggvorbis: use boolMax Kellermann2009-01-14
| | | | Make ogg_parseCommentAddToTag() return bool instead of unsigned int.
* tag_id3: added support for the "album artist" tagDaniele Sluijters2009-01-14
| | | | Read the id3 tags "TPE2" and "TSO2" into the "album artist" tag.
* allow ~/.mpd/mpd.conf as alternate config fileJérôme Quelin2009-01-14
| | | | | | | | | | | | mpd uses some additional files to work, such as pid_file, state_file, db_file, etc. when running mpd as non-root user, it is often that those files end in ~/.mpd in that case, we end up with 2 entries in a user's home, .mpdconf and .mpd - which clutters homedirs. this patch allows ~/.mpd/mpd.conf as an alternative to ~/.mpdconf, allowing for a cleaner homedir
* song_save: don't fail on empty tag valuesMax Kellermann2009-01-14
| | | | | | If a tag value is an empty string, the space after the colon was removed by g_strchomp(). Fix this by removing the space check and using g_strchug() on the return value.
* song_save: return value pointer from matchesAnMpdTagItemKey()Max Kellermann2009-01-14
| | | | | | | The matchesAnMpdTagItemKey() API becomes more powerful and flexible if the return value is the value pointer instead of a boolean. It also removes (invalid and dangerous) assumptions about the string from its caller.
* song_save: itemType is "enum tag_type", not "int"Max Kellermann2009-01-14
|
* playlist: safely search the playlist for deleted songMax Kellermann2009-01-14
| | | | | | | | When a song file is deleted during database update, all pointers to it must be removed from the playlist. The "for" loop in deleteASongFromPlaylist() did not deal with multiple copies of the deleted song properly, and left instances of the (to-be-invalidated) pointer in. Fix this by reversing the loop.
* tag: added core support for the "album artist" tagMax Kellermann2009-01-13
| | | | | | | | Added TAG_ITEM_ALBUM_ARTIST. With this patch, MPD should be able to read the (inofficial) "ALBUMARTIST" Vorbis comment. Implementations in other decoder plugins will follow soon.
* song_save: check for colon and space when loading a tagMax Kellermann2009-01-13
| | | | | | matchesAnMpdTagItemKey() broke when two tag items had the same prefix, because it did not check if the tag name ended after the prefix. Add a check for the colon and the space after the tag name.
* input_curl: honour http_proxy_* config directivesJoe Milbourn2009-01-13
| | | | | | | | | | If http_proxy_{host, port, user, password} are provided in mpd.conf they are not passed on to libcurl. As a result mpd cannot stream from behind an http proxy. The attached patch `http_proxy.patch` makes the relevant calls to curl_easy_setopt(...) for all proxy configuration parameters, but is only tested for host and port.
* daemon: don't check the setsid() return valueMax Kellermann2009-01-13
| | | | | There is only one valid error condition for setsid(): when the current process is already the process group leader. This is non-critical.
* daemon: don't fork twice to daemonizeMax Kellermann2009-01-13
| | | | | To detach from the parent process, fork once and make the old process exit. No need to do that twice.
* playlist: implement Fisher-Yates shuffle properlyMax Kellermann2009-01-13
| | | | | | | | MPD's shuffling algorithm was not implemented well: it considers songs which were already swapped, making it somewhat non-random. Fix the Fisher-Yates shuffle algorithm by passing the proper bounds to the PRNG.
* input_curl: use select() to eliminate busy loop during connectMax Kellermann2009-01-13
| | | | | | | When decoder_run_song() (decoder_thread.c) waits for the input stream to become ready, it did that in a busy loop. Add a select() call to input_curl_buffer() during connect/handshake (i.e. before the first chunk of body data was received), to let the CPU relax.
* decoder_api: don't ignore DECODE_COMMAND_STOPMax Kellermann2009-01-13
| | | | | | When the decoder thread is waiting for free chunks in the music pipe, don't ignore the STOP command. Just return dc.command without further checks.
* configure.ac: added the --enable-sqlite optionMax Kellermann2009-01-12
| | | | | | MPD will (optionall) use sqlite databases in the future. Add a configure option to enable that. There is no code yet to really use sqlite, so the practical use of this patch is limited.
* Makefile.am: moved C/CPP/LDFLAGS upMax Kellermann2009-01-11
|
* removing mixer_reconfigure memmory leak, fixing configure of alsa and oss ↵Viliam Mateicka2009-01-11
| | | | mixer (passing parameters)
* command: restore the "playlistinfo -1" behaviorMax Kellermann2009-01-11
| | | | | If a range is "-1", display the whole list. This behavior is undocumented, but some clients rely on it.
* main: remove "save_state" timer event on exitMax Kellermann2009-01-10
|
* client: remove "expire" event on exitMax Kellermann2009-01-10
|
* event_pipe: remove the GLib source from the main contextMax Kellermann2009-01-10
| | | | Free memory before exiting.
* listen: remove the socket source from the main contextMax Kellermann2009-01-10
| | | | Free memory before exiting.
* listen: added struct listen_socketMax Kellermann2009-01-10
| | | | | Make the listen socket an object, allowing us to add more fields later. Convert listenSockets into a simple linked list.
* main: deinitialize main_notify on exitMax Kellermann2009-01-10
|
* Introducing mixer apiViliam Mateicka2009-01-10
| | | | | This patch tryes to introduce pluggable mixer (struct mixer_plugin) along with some basic infrastructure (mixer_* functions). Instance of mixer (struct mixer) is used in alsa and oss output plugin
* playlist: pass unsigned integers to playlistInfo()Max Kellermann2009-01-10
| | | | | A song index cannot be negative. Also require the second parameter to be valid.
* playlist: exclude end of rangeMax Kellermann2009-01-10
| | | | | 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-10
| | | | | | | | | | | | | 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]]