This new API gives the caller a writable buffer to the music pipe
chunk. This may allow the caller to eliminate several buffer copies,
because it may manipulate the returned buffer, until it calls
music_pipe_expand().
When libvorbis knows that a song is seekable, it seeks around like
crazy in the file before starting to decode it. This is very
expensive on remote HTTP resources, and delays MPD for 10 or 20
seconds.
This patch disables seeking on remote songs, because the advantages of
quickly playing a song seem to weigh more than the theoretical ability
of seeking for most MPD users. If users feel this feature is needed,
we will make a configuration option for that.
getBoolConfigParam() returns an int. It is not possible to check for
CONF_BOOL_UNSET after it has been assigned to a bool; use a temporary
int value for that.
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().
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.
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.
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.
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
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.
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.
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.